[PATCH v2 33/46] scsi: ncr53c8xx: Switch to attribute groups

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

drivers/scsi/ncr53c8xx.c | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c
index 2b8c6fa5e775..a3e397ce9d24 100644
--- a/drivers/scsi/ncr53c8xx.c
+++ b/drivers/scsi/ncr53c8xx.c
@@ -8039,8 +8039,17 @@ static struct device_attribute ncr53c8xx_revision_attr = {
.show = show_ncr53c8xx_revision,
};

-static struct device_attribute *ncr53c8xx_host_attrs[] = {
- &ncr53c8xx_revision_attr,
+static struct attribute *ncr53c8xx_host_attrs[] = {
+ &ncr53c8xx_revision_attr.attr,
+ NULL
+};
+
+static const struct attribute_group ncr53c8xx_host_attr_group = {
+ .attrs = ncr53c8xx_host_attrs
+};
+
+static const struct attribute_group *ncr53c8xx_host_attr_groups[] = {
+ &ncr53c8xx_host_attr_group,
NULL
};

@@ -8085,8 +8094,8 @@ struct Scsi_Host * __init ncr_attach(struct scsi_host_template *tpnt,

if (!tpnt->name)
tpnt->name = SCSI_NCR_DRIVER_NAME;
- if (!tpnt->shost_attrs)
- tpnt->shost_attrs = ncr53c8xx_host_attrs;
+ if (!tpnt->shost_groups)
+ tpnt->shost_groups = ncr53c8xx_host_attr_groups;

tpnt->queuecommand = ncr53c8xx_queue_command;
tpnt->slave_configure = ncr53c8xx_slave_configure;