diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2019-06-05 14:39:26 -0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-06-10 16:56:03 -0300 |
commit | 7a15414252ae4f1d450462d83f883b2d9d8036ee (patch) | |
tree | 0b884a645b7967f746ee25925bc5f6685cacc35c /drivers/infiniband/core/device.c | |
parent | 72c6ec18eb6161c8fc672ae96ec5c77df4d07405 (diff) | |
download | lwn-7a15414252ae4f1d450462d83f883b2d9d8036ee.tar.gz lwn-7a15414252ae4f1d450462d83f883b2d9d8036ee.zip |
RDMA: Move owner into struct ib_device_ops
This more closely follows how other subsytems work, with owner being a
member of the structure containing the function pointers.
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/core/device.c')
-rw-r--r-- | drivers/infiniband/core/device.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c index a00b7fc360bf..357d74c8df2b 100644 --- a/drivers/infiniband/core/device.c +++ b/drivers/infiniband/core/device.c @@ -2323,6 +2323,10 @@ void ib_set_device_ops(struct ib_device *dev, const struct ib_device_ops *ops) dev_ops->driver_id != ops->driver_id); dev_ops->driver_id = ops->driver_id; } + if (ops->owner) { + WARN_ON(dev_ops->owner && dev_ops->owner != ops->owner); + dev_ops->owner = ops->owner; + } if (ops->uverbs_abi_ver) dev_ops->uverbs_abi_ver = ops->uverbs_abi_ver; |