diff options
author | Bart Van Assche <bvanassche@acm.org> | 2021-10-12 16:35:20 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-10-16 21:45:53 -0400 |
commit | 8de1cc904e17fded240533a78a4bf53ff94a64e3 (patch) | |
tree | 5585e10d19431ea686481fd05fd6c564860bddfa /drivers/scsi/3w-sas.c | |
parent | bd21c1e9891fa1acd8c1efbfbfdcd82a3fef0e4c (diff) |
scsi: 3w-sas: 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-9-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 'drivers/scsi/3w-sas.c')
-rw-r--r-- | drivers/scsi/3w-sas.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/scsi/3w-sas.c b/drivers/scsi/3w-sas.c index fc9a2f27aaf9..b9482da79512 100644 --- a/drivers/scsi/3w-sas.c +++ b/drivers/scsi/3w-sas.c @@ -198,11 +198,13 @@ static struct device_attribute twl_host_stats_attr = { }; /* Host attributes initializer */ -static struct device_attribute *twl_host_attrs[] = { - &twl_host_stats_attr, +static struct attribute *twl_host_attrs[] = { + &twl_host_stats_attr.attr, NULL, }; +ATTRIBUTE_GROUPS(twl_host); + /* This function will look up an AEN severity string */ static char *twl_aen_severity_lookup(unsigned char severity_code) { @@ -1542,7 +1544,7 @@ static struct scsi_host_template driver_template = { .sg_tablesize = TW_LIBERATOR_MAX_SGL_LENGTH, .max_sectors = TW_MAX_SECTORS, .cmd_per_lun = TW_MAX_CMDS_PER_LUN, - .shost_attrs = twl_host_attrs, + .shost_groups = twl_host_groups, .emulated = 1, .no_write_same = 1, }; |