aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qedi/qedi_sysfs.c
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2021-10-12 16:35:50 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2021-10-16 21:45:58 -0400
commit1ebbd3b1d9a7294d16a34c24ef32e78d74d1c323 (patch)
tree1ce9958225cf8df62055d99faf0fd2a521d2907c /drivers/scsi/qedi/qedi_sysfs.c
parentscsi: qedf: Switch to attribute groups (diff)
downloadlinux-dev-1ebbd3b1d9a7294d16a34c24ef32e78d74d1c323.tar.xz
linux-dev-1ebbd3b1d9a7294d16a34c24ef32e78d74d1c323.zip
scsi: qedi: Switch to attribute groups
struct device supports attribute groups directly but does not support struct device_attribute directly. Hence switch to attribute groups. Link: https://lore.kernel.org/r/20211012233558.4066756-39-bvanassche@acm.org Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to '')
-rw-r--r--drivers/scsi/qedi/qedi_sysfs.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/scsi/qedi/qedi_sysfs.c b/drivers/scsi/qedi/qedi_sysfs.c
index be174d30eb7c..b00a7e08ef53 100644
--- a/drivers/scsi/qedi/qedi_sysfs.c
+++ b/drivers/scsi/qedi/qedi_sysfs.c
@@ -42,8 +42,17 @@ static ssize_t speed_show(struct device *dev,
static DEVICE_ATTR_RO(port_state);
static DEVICE_ATTR_RO(speed);
-struct device_attribute *qedi_shost_attrs[] = {
- &dev_attr_port_state,
- &dev_attr_speed,
+static struct attribute *qedi_shost_attrs[] = {
+ &dev_attr_port_state.attr,
+ &dev_attr_speed.attr,
+ NULL
+};
+
+static const struct attribute_group qedi_shost_attr_group = {
+ .attrs = qedi_shost_attrs
+};
+
+const struct attribute_group *qedi_shost_groups[] = {
+ &qedi_shost_attr_group,
NULL
};