diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2018-11-12 22:59:52 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-11-22 11:57:32 -0700 |
commit | 6829c1c2b371674a05562a39d608b5cf48351bea (patch) | |
tree | 637fbc743a57f244ff178cc11dc790175dd3f40a /drivers/infiniband/core/uverbs_main.c | |
parent | c27f6aa8c9df7f3270d5f5f2957a2a024262eb99 (diff) | |
download | linux-stable-6829c1c2b371674a05562a39d608b5cf48351bea.tar.gz linux-stable-6829c1c2b371674a05562a39d608b5cf48351bea.tar.bz2 linux-stable-6829c1c2b371674a05562a39d608b5cf48351bea.zip |
RDMA/uverbs: Add helpers to mark uapi functions as unsupported
We have many cases where parts of the uapi are not supported in a driver,
needs a certain protocol, or whatever. It is best to reflect this directly
into the struct uverbs_api when it is built so that everything is simply
blocked off, and future introspection can report a proper supported list.
This is done by adding some additional helpers to the definition list
language that disable objects based on a 'supported' call back, and a
helper that disables based on a NULL struct ib_device function pointer.
Disablement is global. For instance, if a driver disables an object then
everything connected to that object is removed, including core methods.
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/uverbs_main.c')
-rw-r--r-- | drivers/infiniband/core/uverbs_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c index 9a3b88d0095a..375121a4dd12 100644 --- a/drivers/infiniband/core/uverbs_main.c +++ b/drivers/infiniband/core/uverbs_main.c @@ -1224,7 +1224,7 @@ static int ib_uverbs_create_uapi(struct ib_device *device, { struct uverbs_api *uapi; - uapi = uverbs_alloc_api(device->driver_def, device->driver_id); + uapi = uverbs_alloc_api(device); if (IS_ERR(uapi)) return PTR_ERR(uapi); |