diff options
author | Bart Van Assche <bvanassche@acm.org> | 2021-10-13 02:35:14 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-10-17 04:45:52 +0300 |
commit | c3f69c7f629ff53c75f335754ea41426b8e095de (patch) | |
tree | 67639f22fdf1550280865f9a57436f221532376f /drivers/ata/libata-scsi.c | |
parent | 92c4b58b15c56298b1b225c1d2e533165b3e32af (diff) | |
download | linux-c3f69c7f629ff53c75f335754ea41426b8e095de.tar.xz |
scsi: ata: 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-3-bvanassche@acm.org
Acked-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/ata/libata-scsi.c')
-rw-r--r-- | drivers/ata/libata-scsi.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 4afe1abc4709..29eb7cca17a4 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -234,11 +234,20 @@ static void ata_scsi_set_invalid_parameter(struct ata_device *dev, field, 0xff, 0); } -struct device_attribute *ata_common_sdev_attrs[] = { - &dev_attr_unload_heads, +static struct attribute *ata_common_sdev_attrs[] = { + &dev_attr_unload_heads.attr, NULL }; -EXPORT_SYMBOL_GPL(ata_common_sdev_attrs); + +static const struct attribute_group ata_common_sdev_attr_group = { + .attrs = ata_common_sdev_attrs +}; + +const struct attribute_group *ata_common_sdev_groups[] = { + &ata_common_sdev_attr_group, + NULL +}; +EXPORT_SYMBOL_GPL(ata_common_sdev_groups); /** * ata_std_bios_param - generic bios head/sector/cylinder calculator used by sd. |