aboutsummaryrefslogtreecommitdiffstats
path: root/include/rdma/ib_verbs.h
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2018-09-05 09:47:58 +0300
committerJason Gunthorpe <jgg@mellanox.com>2018-09-05 16:19:18 -0600
commitadee9f3f3bbb317c5469f84deba01eef4b86515b (patch)
tree4e40df660e33e96cbb18c16a3530e89ce1e8611f /include/rdma/ib_verbs.h
parentRDMA/uverbs: Fix error cleanup path of ib_uverbs_add_one() (diff)
downloadlinux-dev-adee9f3f3bbb317c5469f84deba01eef4b86515b.tar.xz
linux-dev-adee9f3f3bbb317c5469f84deba01eef4b86515b.zip
RDMA/core: Depend on device_add() to add device attributes
Instead of adding/removing device attribute files, depend on device_add() which considers adding these device files based on NULL terminated attributes group 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 'include/rdma/ib_verbs.h')
-rw-r--r--include/rdma/ib_verbs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index e950c2a68f06..cd0f935f0bc1 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -2536,6 +2536,9 @@ struct ib_device {
struct module *owner;
struct device dev;
+ /* First group for device attributes, NULL terminated array */
+ const struct attribute_group *groups[2];
+
struct kobject *ports_parent;
struct list_head port_list;