diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2019-06-05 19:39:24 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-06-10 21:56:02 +0200 |
commit | b9560a419bfd498279333387817adcf5faef2825 (patch) | |
tree | 6ebfe84162f6a44856fe910c2c54ed535d6bf81e /drivers/infiniband/hw/i40iw | |
parent | rdma: Delete the ib_ucm module (diff) | |
download | linux-b9560a419bfd498279333387817adcf5faef2825.tar.xz linux-b9560a419bfd498279333387817adcf5faef2825.zip |
RDMA: Move driver_id into struct ib_device_ops
No reason for every driver to emit code to set this, just make it part of
the driver's existing static const ops structure.
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/i40iw')
-rw-r--r-- | drivers/infiniband/hw/i40iw/i40iw_verbs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/i40iw/i40iw_verbs.c b/drivers/infiniband/hw/i40iw/i40iw_verbs.c index a10a30d44b32..1979cefdf90c 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_verbs.c +++ b/drivers/infiniband/hw/i40iw/i40iw_verbs.c @@ -2650,6 +2650,8 @@ static int i40iw_query_pkey(struct ib_device *ibdev, } static const struct ib_device_ops i40iw_dev_ops = { + .driver_id = RDMA_DRIVER_I40IW, + .alloc_hw_stats = i40iw_alloc_hw_stats, .alloc_mr = i40iw_alloc_mr, .alloc_pd = i40iw_alloc_pd, @@ -2787,7 +2789,6 @@ int i40iw_register_rdma_device(struct i40iw_device *iwdev) return -ENOMEM; iwibdev = iwdev->iwibdev; rdma_set_device_sysfs_group(&iwibdev->ibdev, &i40iw_attr_group); - iwibdev->ibdev.driver_id = RDMA_DRIVER_I40IW; ret = ib_register_device(&iwibdev->ibdev, "i40iw%d"); if (ret) goto error; |