aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/efa
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2019-06-05 14:39:24 -0300
committerJason Gunthorpe <jgg@mellanox.com>2019-06-10 16:56:02 -0300
commitb9560a419bfd498279333387817adcf5faef2825 (patch)
tree6ebfe84162f6a44856fe910c2c54ed535d6bf81e /drivers/infiniband/hw/efa
parentrdma: Delete the ib_ucm module (diff)
downloadlinux-dev-b9560a419bfd498279333387817adcf5faef2825.tar.xz
linux-dev-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/efa')
-rw-r--r--drivers/infiniband/hw/efa/efa_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/efa/efa_main.c b/drivers/infiniband/hw/efa/efa_main.c
index db974caf1eb1..3803dd4526b5 100644
--- a/drivers/infiniband/hw/efa/efa_main.c
+++ b/drivers/infiniband/hw/efa/efa_main.c
@@ -197,6 +197,8 @@ static void efa_stats_init(struct efa_dev *dev)
}
static const struct ib_device_ops efa_dev_ops = {
+ .driver_id = RDMA_DRIVER_EFA,
+
.alloc_pd = efa_alloc_pd,
.alloc_ucontext = efa_alloc_ucontext,
.create_ah = efa_create_ah,
@@ -287,7 +289,6 @@ static int efa_ib_device_add(struct efa_dev *dev)
dev->ibdev.uverbs_ex_cmd_mask =
(1ull << IB_USER_VERBS_EX_CMD_QUERY_DEVICE);
- dev->ibdev.driver_id = RDMA_DRIVER_EFA;
ib_set_device_ops(&dev->ibdev, &efa_dev_ops);
err = ib_register_device(&dev->ibdev, "efa_%d");