Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: aacraid: 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-12-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Bart Van Assche and committed by
Martin K. Petersen
bd16d711 90cb6538

+21 -17
+21 -17
drivers/scsi/aacraid/linit.c
··· 605 605 606 606 607 607 608 - static struct device_attribute *aac_dev_attrs[] = { 609 - &aac_raid_level_attr, 610 - &aac_unique_id_attr, 608 + static struct attribute *aac_dev_attrs[] = { 609 + &aac_raid_level_attr.attr, 610 + &aac_unique_id_attr.attr, 611 611 NULL, 612 612 }; 613 + 614 + ATTRIBUTE_GROUPS(aac_dev); 613 615 614 616 static int aac_ioctl(struct scsi_device *sdev, unsigned int cmd, 615 617 void __user *arg) ··· 1444 1442 .show = aac_show_reset_adapter, 1445 1443 }; 1446 1444 1447 - static struct device_attribute *aac_attrs[] = { 1448 - &aac_model, 1449 - &aac_vendor, 1450 - &aac_flags, 1451 - &aac_kernel_version, 1452 - &aac_monitor_version, 1453 - &aac_bios_version, 1454 - &aac_lld_version, 1455 - &aac_serial_number, 1456 - &aac_max_channel, 1457 - &aac_max_id, 1458 - &aac_reset, 1445 + static struct attribute *aac_host_attrs[] = { 1446 + &aac_model.attr, 1447 + &aac_vendor.attr, 1448 + &aac_flags.attr, 1449 + &aac_kernel_version.attr, 1450 + &aac_monitor_version.attr, 1451 + &aac_bios_version.attr, 1452 + &aac_lld_version.attr, 1453 + &aac_serial_number.attr, 1454 + &aac_max_channel.attr, 1455 + &aac_max_id.attr, 1456 + &aac_reset.attr, 1459 1457 NULL 1460 1458 }; 1459 + 1460 + ATTRIBUTE_GROUPS(aac_host); 1461 1461 1462 1462 ssize_t aac_get_serial_number(struct device *device, char *buf) 1463 1463 { ··· 1487 1483 #endif 1488 1484 .queuecommand = aac_queuecommand, 1489 1485 .bios_param = aac_biosparm, 1490 - .shost_attrs = aac_attrs, 1486 + .shost_groups = aac_host_groups, 1491 1487 .slave_configure = aac_slave_configure, 1492 1488 .change_queue_depth = aac_change_queue_depth, 1493 - .sdev_attrs = aac_dev_attrs, 1489 + .sdev_groups = aac_dev_groups, 1494 1490 .eh_abort_handler = aac_eh_abort, 1495 1491 .eh_device_reset_handler = aac_eh_dev_reset, 1496 1492 .eh_target_reset_handler = aac_eh_target_reset,