Commit ab53de24 authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen

scsi: megaraid_mbox: 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-29-bvanassche@acm.orgSigned-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 08adfa75
...@@ -305,20 +305,23 @@ static struct pci_driver megaraid_pci_driver = { ...@@ -305,20 +305,23 @@ static struct pci_driver megaraid_pci_driver = {
static DEVICE_ATTR_ADMIN_RO(megaraid_mbox_app_hndl); static DEVICE_ATTR_ADMIN_RO(megaraid_mbox_app_hndl);
// Host template initializer for megaraid mbox sysfs device attributes // Host template initializer for megaraid mbox sysfs device attributes
static struct device_attribute *megaraid_shost_attrs[] = { static struct attribute *megaraid_shost_attrs[] = {
&dev_attr_megaraid_mbox_app_hndl, &dev_attr_megaraid_mbox_app_hndl.attr,
NULL, NULL,
}; };
ATTRIBUTE_GROUPS(megaraid_shost);
static DEVICE_ATTR_ADMIN_RO(megaraid_mbox_ld); static DEVICE_ATTR_ADMIN_RO(megaraid_mbox_ld);
// Host template initializer for megaraid mbox sysfs device attributes // Host template initializer for megaraid mbox sysfs device attributes
static struct device_attribute *megaraid_sdev_attrs[] = { static struct attribute *megaraid_sdev_attrs[] = {
&dev_attr_megaraid_mbox_ld, &dev_attr_megaraid_mbox_ld.attr,
NULL, NULL,
}; };
ATTRIBUTE_GROUPS(megaraid_sdev);
/* /*
* Scsi host template for megaraid unified driver * Scsi host template for megaraid unified driver
*/ */
...@@ -331,8 +334,8 @@ static struct scsi_host_template megaraid_template_g = { ...@@ -331,8 +334,8 @@ static struct scsi_host_template megaraid_template_g = {
.eh_host_reset_handler = megaraid_reset_handler, .eh_host_reset_handler = megaraid_reset_handler,
.change_queue_depth = scsi_change_queue_depth, .change_queue_depth = scsi_change_queue_depth,
.no_write_same = 1, .no_write_same = 1,
.sdev_attrs = megaraid_sdev_attrs, .sdev_groups = megaraid_sdev_groups,
.shost_attrs = megaraid_shost_attrs, .shost_groups = megaraid_shost_groups,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment