diff options
author | Parav Pandit <parav@mellanox.com> | 2018-09-05 09:48:00 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-09-05 16:19:25 -0600 |
commit | b53b1c08a23eb1091982daacb2122f90a7094a77 (patch) | |
tree | 5496d534bb224e63dd25dd261dda2cf921c0556f /drivers/infiniband/core/uverbs.h | |
parent | c5c4d92e70f37369b5bdca5e85f9fc55dc2c8a3b (diff) | |
download | linux-b53b1c08a23eb1091982daacb2122f90a7094a77.tar.gz linux-b53b1c08a23eb1091982daacb2122f90a7094a77.tar.bz2 linux-b53b1c08a23eb1091982daacb2122f90a7094a77.zip |
RDMA/uverbs: Use device.groups to initialize device attributes
Instead of explicitly adding device attribute files and handling such
error conditions, depend on device core layer to create device attributes
files based group pointer NULL terminated array.
Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/uverbs.h')
-rw-r--r-- | drivers/infiniband/core/uverbs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/core/uverbs.h b/drivers/infiniband/core/uverbs.h index 0288aec432a4..7199c275ab79 100644 --- a/drivers/infiniband/core/uverbs.h +++ b/drivers/infiniband/core/uverbs.h @@ -101,6 +101,8 @@ struct ib_uverbs_device { int num_comp_vectors; struct completion comp; struct device dev; + /* First group for device attributes, NULL terminated array */ + const struct attribute_group *groups[2]; struct ib_device __rcu *ib_dev; int devnum; struct cdev cdev; |