[PATCH v2 34/46] scsi: sym53c500_cs: Switch to attribute groups

Bart Van Assche
2021-10-07T21:20:27Z

drivers/scsi/pcmcia/sym53c500_cs.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/pcmcia/sym53c500_cs.c b/drivers/scsi/pcmcia/sym53c500_cs.c
index a366ff1a3959..e2d485e0e474 100644
--- a/drivers/scsi/pcmcia/sym53c500_cs.c
+++ b/drivers/scsi/pcmcia/sym53c500_cs.c
@@ -652,11 +652,20 @@ static struct device_attribute SYM53C500_pio_attr = {
.store = SYM53C500_store_pio,
};

-static struct device_attribute *SYM53C500_shost_attrs[] = {
- &SYM53C500_pio_attr,
+static struct attribute *SYM53C500_shost_attrs[] = {
+ &SYM53C500_pio_attr.attr,
NULL,
};

+static const struct attribute_group SYM53C500_shost_attr_group = {
+ .attrs = SYM53C500_shost_attrs
+};
+
+static const struct attribute_group *SYM53C500_shost_groups[] = {
+ &SYM53C500_shost_attr_group,
+ NULL
+};
+
/*
* scsi_host_template initializer
*/
@@ -671,7 +680,7 @@ static struct scsi_host_template sym53c500_driver_template = {
.can_queue = 1,
.this_id = 7,
.sg_tablesize = 32,
- .shost_attrs = SYM53C500_shost_attrs
+ .shost_groups = SYM53C500_shost_groups
};

static int SYM53C500_config_check(struct pcmcia_device *p_dev, void *priv_data)