struct device supports attribute groups directly but does not support struct device_attribute directly. Hence switch to attribute groups. Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx> --- drivers/scsi/3w-9xxx.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c index e41cc354cc8a..785b3819588e 100644 --- a/drivers/scsi/3w-9xxx.c +++ b/drivers/scsi/3w-9xxx.c @@ -197,11 +197,20 @@ static struct device_attribute twa_host_stats_attr = { }; /* Host attributes initializer */ -static struct device_attribute *twa_host_attrs[] = { - &twa_host_stats_attr, +static struct attribute *twa_host_attrs[] = { + &twa_host_stats_attr.attr, NULL, }; +static const struct attribute_group twa_host_attr_group = { + .attrs = twa_host_attrs +}; + +static const struct attribute_group *twa_host_attr_groups[] = { + &twa_host_attr_group, + NULL +}; + /* File operations struct for character device */ static const struct file_operations twa_fops = { .owner = THIS_MODULE, @@ -1990,7 +1999,7 @@ static struct scsi_host_template driver_template = { .sg_tablesize = TW_APACHE_MAX_SGL_LENGTH, .max_sectors = TW_MAX_SECTORS, .cmd_per_lun = TW_MAX_CMDS_PER_LUN, - .shost_attrs = twa_host_attrs, + .shost_groups = twa_host_attr_groups, .emulated = 1, .no_write_same = 1, };