RDMA: Rename port_callback to init_port
Most provider routines are callback routines which ib core invokes. _callback suffix doesn't convey information about when such callback is invoked. Therefore, rename port_callback to init_port. Additionally, store the init_port function pointer in ib_device_ops, so that it can be accessed in subsequent patches when binding rdma device to net namespace. Signed-off-by: Parav Pandit <parav@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:

committed by
Jason Gunthorpe

parent
081de9495c
commit
ea4baf7f11
@@ -446,7 +446,7 @@ static noinline int check_support(struct rvt_dev_info *rdi, int verb)
|
||||
* These functions are not part of verbs specifically but are
|
||||
* required for rdmavt to function.
|
||||
*/
|
||||
if ((!rdi->driver_f.port_callback) ||
|
||||
if ((!rdi->ibdev.ops.init_port) ||
|
||||
(!rdi->driver_f.get_pci_dev))
|
||||
return -EINVAL;
|
||||
break;
|
||||
@@ -644,8 +644,7 @@ int rvt_register_device(struct rvt_dev_info *rdi, u32 driver_id)
|
||||
|
||||
rdi->ibdev.driver_id = driver_id;
|
||||
/* We are now good to announce we exist */
|
||||
ret = ib_register_device(&rdi->ibdev, dev_name(&rdi->ibdev.dev),
|
||||
rdi->driver_f.port_callback);
|
||||
ret = ib_register_device(&rdi->ibdev, dev_name(&rdi->ibdev.dev));
|
||||
if (ret) {
|
||||
rvt_pr_err(rdi, "Failed to register driver with ib core.\n");
|
||||
goto bail_wss;
|
||||
|
Reference in New Issue
Block a user