IB/rdmavt: Move driver helper functions to a common structure
Drivers are going to need to provide multiple functions for rdmavt to call in to. We already have one, so go ahead and push this into a data structure designated for driver supplied functions. Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Esse commit está contido em:

commit de
Doug Ledford

pai
ca889e8ad3
commit
aec5778775
@@ -280,8 +280,12 @@ int rvt_register_device(struct rvt_dev_info *rdi)
|
||||
spin_lock_init(&rdi->n_pds_lock);
|
||||
rdi->n_pds_allocated = 0;
|
||||
|
||||
/* Validate that drivers have provided the right functions */
|
||||
if (!rdi->driver_f.port_callback)
|
||||
return -EINVAL;
|
||||
|
||||
/* We are now good to announce we exist */
|
||||
return ib_register_device(&rdi->ibdev, rdi->port_callback);
|
||||
return ib_register_device(&rdi->ibdev, rdi->driver_f.port_callback);
|
||||
}
|
||||
EXPORT_SYMBOL(rvt_register_device);
|
||||
|
||||
|
Referência em uma nova issue
Block a user