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

scsi: firewire: sbp2: 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-4-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
5e88e67b c3f69c7f

+5 -3
+5 -3
drivers/firewire/sbp2.c
··· 1578 1578 1579 1579 static DEVICE_ATTR(ieee1394_id, S_IRUGO, sbp2_sysfs_ieee1394_id_show, NULL); 1580 1580 1581 - static struct device_attribute *sbp2_scsi_sysfs_attrs[] = { 1582 - &dev_attr_ieee1394_id, 1581 + static struct attribute *sbp2_scsi_sysfs_attrs[] = { 1582 + &dev_attr_ieee1394_id.attr, 1583 1583 NULL 1584 1584 }; 1585 + 1586 + ATTRIBUTE_GROUPS(sbp2_scsi_sysfs); 1585 1587 1586 1588 static struct scsi_host_template scsi_driver_template = { 1587 1589 .module = THIS_MODULE, ··· 1597 1595 .sg_tablesize = SG_ALL, 1598 1596 .max_segment_size = SBP2_MAX_SEG_SIZE, 1599 1597 .can_queue = 1, 1600 - .sdev_attrs = sbp2_scsi_sysfs_attrs, 1598 + .sdev_groups = sbp2_scsi_sysfs_groups, 1601 1599 }; 1602 1600 1603 1601 MODULE_AUTHOR("Kristian Hoegsberg <krh@bitplanet.net>");