diff options
author | Bart Van Assche <bvanassche@acm.org> | 2021-10-13 02:35:32 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-10-17 04:45:55 +0300 |
commit | 62ac8ccbb819e35eb107a7ef7ebdd678173aa49c (patch) | |
tree | ed3381a40b2ddf01e2a894e602b195f1cc5e2bdc /drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | |
parent | d6ddcd8b38ab10d865e6a399a79934556ef4e0c4 (diff) | |
download | linux-62ac8ccbb819e35eb107a7ef7ebdd678173aa49c.tar.xz |
scsi: hisi_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-21-bvanassche@acm.org
Acked-by: John Garry <john.garry@huawei.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/hisi_sas/hisi_sas_v1_hw.c')
-rw-r--r-- | drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c index b4951ff9ca51..3059d19e4368 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c @@ -1742,11 +1742,13 @@ static int hisi_sas_v1_init(struct hisi_hba *hisi_hba) return 0; } -static struct device_attribute *host_attrs_v1_hw[] = { - &dev_attr_phy_event_threshold, +static struct attribute *host_v1_hw_attrs[] = { + &dev_attr_phy_event_threshold.attr, NULL }; +ATTRIBUTE_GROUPS(host_v1_hw); + static struct scsi_host_template sht_v1_hw = { .name = DRV_NAME, .proc_name = DRV_NAME, @@ -1770,7 +1772,7 @@ static struct scsi_host_template sht_v1_hw = { #ifdef CONFIG_COMPAT .compat_ioctl = sas_ioctl, #endif - .shost_attrs = host_attrs_v1_hw, + .shost_groups = host_v1_hw_groups, .host_reset = hisi_sas_host_reset, }; |