Commit 01e570fe authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen

scsi: usb: 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-46-bvanassche@acm.orgAcked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 7ce6000a
...@@ -587,11 +587,13 @@ static ssize_t max_sectors_store(struct device *dev, struct device_attribute *at ...@@ -587,11 +587,13 @@ static ssize_t max_sectors_store(struct device *dev, struct device_attribute *at
} }
static DEVICE_ATTR_RW(max_sectors); static DEVICE_ATTR_RW(max_sectors);
static struct device_attribute *sysfs_device_attr_list[] = { static struct attribute *usb_sdev_attrs[] = {
&dev_attr_max_sectors, &dev_attr_max_sectors.attr,
NULL, NULL,
}; };
ATTRIBUTE_GROUPS(usb_sdev);
/* /*
* this defines our host template, with which we'll allocate hosts * this defines our host template, with which we'll allocate hosts
*/ */
...@@ -652,7 +654,7 @@ static const struct scsi_host_template usb_stor_host_template = { ...@@ -652,7 +654,7 @@ static const struct scsi_host_template usb_stor_host_template = {
.skip_settle_delay = 1, .skip_settle_delay = 1,
/* sysfs device attributes */ /* sysfs device attributes */
.sdev_attrs = sysfs_device_attr_list, .sdev_groups = usb_sdev_groups,
/* module management */ /* module management */
.module = THIS_MODULE .module = THIS_MODULE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment