diff options
author | Bart Van Assche <bvanassche@acm.org> | 2021-10-12 16:35:42 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-10-16 21:45:57 -0400 |
commit | 88b8132cff99f29216098fb30714faa6ad969700 (patch) | |
tree | 30cdb65fc23ecede0a6d4fa5e2cac9863a478a1a /drivers/scsi/mvsas | |
parent | 1bb3ca27d2caa109c615fdd16c3b44492ee5bbee (diff) | |
download | linux-stable-88b8132cff99f29216098fb30714faa6ad969700.tar.gz linux-stable-88b8132cff99f29216098fb30714faa6ad969700.tar.bz2 linux-stable-88b8132cff99f29216098fb30714faa6ad969700.zip |
scsi: mvsas: 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-31-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/mvsas')
-rw-r--r-- | drivers/scsi/mvsas/mv_init.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c index f18dd9703595..dcae2d4464f9 100644 --- a/drivers/scsi/mvsas/mv_init.c +++ b/drivers/scsi/mvsas/mv_init.c @@ -25,7 +25,7 @@ static const struct mvs_chip_info mvs_chips[] = { [chip_1320] = { 2, 4, 0x800, 17, 64, 8, 9, &mvs_94xx_dispatch, }, }; -static struct device_attribute *mvst_host_attrs[]; +static const struct attribute_group *mvst_host_groups[]; #define SOC_SAS_NUM 2 @@ -52,7 +52,7 @@ static struct scsi_host_template mvs_sht = { #ifdef CONFIG_COMPAT .compat_ioctl = sas_ioctl, #endif - .shost_attrs = mvst_host_attrs, + .shost_groups = mvst_host_groups, .track_queue_depth = 1, }; @@ -773,12 +773,14 @@ static void __exit mvs_exit(void) sas_release_transport(mvs_stt); } -static struct device_attribute *mvst_host_attrs[] = { - &dev_attr_driver_version, - &dev_attr_interrupt_coalescing, +static struct attribute *mvst_host_attrs[] = { + &dev_attr_driver_version.attr, + &dev_attr_interrupt_coalescing.attr, NULL, }; +ATTRIBUTE_GROUPS(mvst_host); + module_init(mvs_init); module_exit(mvs_exit); |