diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2021-06-11 19:00:32 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2021-06-16 20:58:31 -0300 |
commit | d7407d16699884817f3a93218e77b0801942362b (patch) | |
tree | 62354cafcb7d6ae509521eef88a4ab11393d07a4 /drivers/infiniband/hw/qib/qib.h | |
parent | RDMA/hfi1: Use attributes for the port sysfs (diff) | |
download | linux-dev-d7407d16699884817f3a93218e77b0801942362b.tar.xz linux-dev-d7407d16699884817f3a93218e77b0801942362b.zip |
RDMA: Change ops->init_port to ops->port_groups
init_port was only being used to register sysfs attributes against the
port kobject. Now that all users are creating static attribute_group's we
can simply set the attribute_group list in the ops and the core code can
just handle it directly.
This makes all the sysfs management quite straightforward and prevents any
driver from abusing the naked port kobject in future because no driver
code can access it.
Link: https://lore.kernel.org/r/114f68f3d921460eafe14cea5a80ca65d81729c3.1623427137.git.leonro@nvidia.com
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/hw/qib/qib.h')
-rw-r--r-- | drivers/infiniband/hw/qib/qib.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/qib/qib.h b/drivers/infiniband/hw/qib/qib.h index b8a2deb5b4d2..9363bccfc6e7 100644 --- a/drivers/infiniband/hw/qib/qib.h +++ b/drivers/infiniband/hw/qib/qib.h @@ -1361,13 +1361,11 @@ static inline u32 qib_get_rcvhdrtail(const struct qib_ctxtdata *rcd) extern const char ib_qib_version[]; extern const struct attribute_group qib_attr_group; +extern const struct attribute_group *qib_attr_port_groups[]; int qib_device_create(struct qib_devdata *); void qib_device_remove(struct qib_devdata *); -int qib_create_port_files(struct ib_device *ibdev, u32 port_num, - struct kobject *kobj); -void qib_verbs_unregister_sysfs(struct qib_devdata *); /* Hook for sysfs read of QSFP */ extern int qib_qsfp_dump(struct qib_pportdata *ppd, char *buf, int len); |