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.org Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
08adfa7537
commit
ab53de242e
@ -305,20 +305,23 @@ static struct pci_driver megaraid_pci_driver = {
|
||||
static DEVICE_ATTR_ADMIN_RO(megaraid_mbox_app_hndl);
|
||||
|
||||
// Host template initializer for megaraid mbox sysfs device attributes
|
||||
static struct device_attribute *megaraid_shost_attrs[] = {
|
||||
&dev_attr_megaraid_mbox_app_hndl,
|
||||
static struct attribute *megaraid_shost_attrs[] = {
|
||||
&dev_attr_megaraid_mbox_app_hndl.attr,
|
||||
NULL,
|
||||
};
|
||||
|
||||
ATTRIBUTE_GROUPS(megaraid_shost);
|
||||
|
||||
static DEVICE_ATTR_ADMIN_RO(megaraid_mbox_ld);
|
||||
|
||||
// Host template initializer for megaraid mbox sysfs device attributes
|
||||
static struct device_attribute *megaraid_sdev_attrs[] = {
|
||||
&dev_attr_megaraid_mbox_ld,
|
||||
static struct attribute *megaraid_sdev_attrs[] = {
|
||||
&dev_attr_megaraid_mbox_ld.attr,
|
||||
NULL,
|
||||
};
|
||||
|
||||
ATTRIBUTE_GROUPS(megaraid_sdev);
|
||||
|
||||
/*
|
||||
* Scsi host template for megaraid unified driver
|
||||
*/
|
||||
@ -331,8 +334,8 @@ static struct scsi_host_template megaraid_template_g = {
|
||||
.eh_host_reset_handler = megaraid_reset_handler,
|
||||
.change_queue_depth = scsi_change_queue_depth,
|
||||
.no_write_same = 1,
|
||||
.sdev_attrs = megaraid_sdev_attrs,
|
||||
.shost_attrs = megaraid_shost_attrs,
|
||||
.sdev_groups = megaraid_sdev_groups,
|
||||
.shost_groups = megaraid_shost_groups,
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user