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>
This commit is contained in:
committed by
Jason Gunthorpe
parent
08e74be103
commit
adee9f3f3b
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user