diff options
Diffstat (limited to 'drivers/infiniband/hw/qib')
-rw-r--r-- | drivers/infiniband/hw/qib/qib.h | 4 | ||||
-rw-r--r-- | drivers/infiniband/hw/qib/qib_sysfs.c | 20 | ||||
-rw-r--r-- | drivers/infiniband/hw/qib/qib_verbs.c | 4 |
3 files changed, 3 insertions, 25 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); diff --git a/drivers/infiniband/hw/qib/qib_sysfs.c b/drivers/infiniband/hw/qib/qib_sysfs.c index a1e22c498712..d57e49de6650 100644 --- a/drivers/infiniband/hw/qib/qib_sysfs.c +++ b/drivers/infiniband/hw/qib/qib_sysfs.c @@ -545,7 +545,7 @@ static const struct attribute_group port_diagc_group = { /* End diag_counters */ -static const struct attribute_group *qib_port_groups[] = { +const struct attribute_group *qib_attr_port_groups[] = { &port_linkcontrol_group, &port_ccmgta_attribute_group, &port_sl2vl_group, @@ -733,21 +733,3 @@ static struct attribute *qib_attributes[] = { const struct attribute_group qib_attr_group = { .attrs = qib_attributes, }; - -int qib_create_port_files(struct ib_device *ibdev, u32 port_num, - struct kobject *kobj) -{ - return ib_port_sysfs_create_groups(ibdev, port_num, qib_port_groups); -} - -/* - * Unregister and remove our files in /sys/class/infiniband. - */ -void qib_verbs_unregister_sysfs(struct qib_devdata *dd) -{ - int i; - - for (i = 0; i < dd->num_pports; i++) - ib_port_sysfs_remove_groups(&dd->verbs_dev.rdi.ibdev, i, - qib_port_groups); -} diff --git a/drivers/infiniband/hw/qib/qib_verbs.c b/drivers/infiniband/hw/qib/qib_verbs.c index d17d034ecdfd..8640a75d61d9 100644 --- a/drivers/infiniband/hw/qib/qib_verbs.c +++ b/drivers/infiniband/hw/qib/qib_verbs.c @@ -1483,7 +1483,7 @@ static const struct ib_device_ops qib_dev_ops = { .owner = THIS_MODULE, .driver_id = RDMA_DRIVER_QIB, - .init_port = qib_create_port_files, + .port_groups = qib_attr_port_groups, .modify_device = qib_modify_device, .process_mad = qib_process_mad, }; @@ -1644,8 +1644,6 @@ void qib_unregister_ib_device(struct qib_devdata *dd) { struct qib_ibdev *dev = &dd->verbs_dev; - qib_verbs_unregister_sysfs(dd); - rvt_unregister_device(&dd->verbs_dev.rdi); if (!list_empty(&dev->piowait)) |