aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/uverbs.h
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2018-09-05 09:48:00 +0300
committerJason Gunthorpe <jgg@mellanox.com>2018-09-05 16:19:25 -0600
commitb53b1c08a23eb1091982daacb2122f90a7094a77 (patch)
tree5496d534bb224e63dd25dd261dda2cf921c0556f /drivers/infiniband/core/uverbs.h
parentRDMA/uverbs: Use cdev_device_add() instead of cdev_add() (diff)
downloadlinux-dev-b53b1c08a23eb1091982daacb2122f90a7094a77.tar.xz
linux-dev-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.h2
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;