Skip to content

Commit

Permalink
linux/efa: Move owner into struct ib_device_ops
Browse files Browse the repository at this point in the history
[ Upstream commit 7a15414252ae4f1d450462d83f883b2d9d8036ee ]

This more closely follows how other subsytems work, with owner being a
member of the structure containing the function pointers.

Reviewed-by: Firas JahJah <[email protected]>
Reviewed-by: Yossi Leybovich <[email protected]>
Signed-off-by: Gal Pressman <[email protected]>
  • Loading branch information
gal-pressman committed Aug 28, 2019
1 parent 6a7d1c9 commit 20607bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/linux/efa/efa_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ static void efa_stats_init(struct efa_dev *dev)
#ifdef HAVE_IB_DEV_OPS
static const struct ib_device_ops efa_dev_ops = {
#ifdef HAVE_IB_DEVICE_OPS_COMMON
.owner = THIS_MODULE,
.driver_id = RDMA_DRIVER_EFA,
.uverbs_abi_ver = EFA_UVERBS_ABI_VERSION,
#endif
Expand Down Expand Up @@ -339,7 +340,6 @@ static int efa_ib_device_add(struct efa_dev *dev)
if (err)
goto err_release_doorbell_bar;

dev->ibdev.owner = THIS_MODULE;
#ifdef HAVE_UPSTREAM_EFA
dev->ibdev.node_type = RDMA_NODE_UNSPECIFIED;
#else
Expand Down Expand Up @@ -381,6 +381,7 @@ static int efa_ib_device_add(struct efa_dev *dev)
dev->ibdev.driver_id = RDMA_DRIVER_EFA;
#endif
dev->ibdev.uverbs_abi_ver = EFA_UVERBS_ABI_VERSION;
dev->ibdev.owner = THIS_MODULE;
#endif
#ifdef HAVE_IB_DEV_OPS
ib_set_device_ops(&dev->ibdev, &efa_dev_ops);
Expand Down

0 comments on commit 20607bd

Please sign in to comment.