RDMA: Move uverbs_abi_ver 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>
This commit is contained in:
Jason Gunthorpe
2019-06-05 14:39:25 -03:00
parent b9560a419b
commit 72c6ec18eb
20 changed files with 33 additions and 25 deletions

View File

@@ -184,6 +184,7 @@ static void qedr_roce_register_device(struct qedr_dev *dev)
static const struct ib_device_ops qedr_dev_ops = {
.driver_id = RDMA_DRIVER_QEDR,
.uverbs_abi_ver = QEDR_ABI_VERSION,
.alloc_mr = qedr_alloc_mr,
.alloc_pd = qedr_alloc_pd,
@@ -234,7 +235,6 @@ static int qedr_register_device(struct qedr_dev *dev)
dev->ibdev.node_guid = dev->attr.node_guid;
memcpy(dev->ibdev.node_desc, QEDR_NODE_DESC, sizeof(QEDR_NODE_DESC));
dev->ibdev.owner = THIS_MODULE;
dev->ibdev.uverbs_abi_ver = QEDR_ABI_VERSION;
dev->ibdev.uverbs_cmd_mask = QEDR_UVERBS(GET_CONTEXT) |
QEDR_UVERBS(QUERY_DEVICE) |