diff options
author | Bart Van Assche <bvanassche@acm.org> | 2021-10-13 02:35:28 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-10-17 04:45:55 +0300 |
commit | eb78ac7a5474b56fa7b71991664843b9e678f8a3 (patch) | |
tree | dc8711812abf5a1fdba9bb7b4e2bcc53bb75c9e8 /drivers/scsi/bnx2i/bnx2i_sysfs.c | |
parent | c3dd11d8ed4de2d79ec26b7d671ec1b7bfbeda0c (diff) | |
download | linux-eb78ac7a5474b56fa7b71991664843b9e678f8a3.tar.xz |
scsi: bnx2i: 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-17-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/bnx2i/bnx2i_sysfs.c')
-rw-r--r-- | drivers/scsi/bnx2i/bnx2i_sysfs.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/scsi/bnx2i/bnx2i_sysfs.c b/drivers/scsi/bnx2i/bnx2i_sysfs.c index bea00073cb7c..d6b0bbb5176b 100644 --- a/drivers/scsi/bnx2i/bnx2i_sysfs.c +++ b/drivers/scsi/bnx2i/bnx2i_sysfs.c @@ -142,8 +142,17 @@ static DEVICE_ATTR(sq_size, S_IRUGO | S_IWUSR, static DEVICE_ATTR(num_ccell, S_IRUGO | S_IWUSR, bnx2i_show_ccell_info, bnx2i_set_ccell_info); -struct device_attribute *bnx2i_dev_attributes[] = { - &dev_attr_sq_size, - &dev_attr_num_ccell, +static struct attribute *bnx2i_dev_attributes[] = { + &dev_attr_sq_size.attr, + &dev_attr_num_ccell.attr, + NULL +}; + +static const struct attribute_group bnx2i_dev_attr_group = { + .attrs = bnx2i_dev_attributes +}; + +const struct attribute_group *bnx2i_dev_groups[] = { + &bnx2i_dev_attr_group, NULL }; |