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

scsi: ipr: 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-26-bvanassche@acm.orgSigned-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 7adbf68f
...@@ -4236,18 +4236,20 @@ static struct bin_attribute ipr_ioa_async_err_log = { ...@@ -4236,18 +4236,20 @@ static struct bin_attribute ipr_ioa_async_err_log = {
.write = ipr_next_async_err_log .write = ipr_next_async_err_log
}; };
static struct device_attribute *ipr_ioa_attrs[] = { static struct attribute *ipr_ioa_attrs[] = {
&ipr_fw_version_attr, &ipr_fw_version_attr.attr,
&ipr_log_level_attr, &ipr_log_level_attr.attr,
&ipr_diagnostics_attr, &ipr_diagnostics_attr.attr,
&ipr_ioa_state_attr, &ipr_ioa_state_attr.attr,
&ipr_ioa_reset_attr, &ipr_ioa_reset_attr.attr,
&ipr_update_fw_attr, &ipr_update_fw_attr.attr,
&ipr_ioa_fw_type_attr, &ipr_ioa_fw_type_attr.attr,
&ipr_iopoll_weight_attr, &ipr_iopoll_weight_attr.attr,
NULL, NULL,
}; };
ATTRIBUTE_GROUPS(ipr_ioa);
#ifdef CONFIG_SCSI_IPR_DUMP #ifdef CONFIG_SCSI_IPR_DUMP
/** /**
* ipr_read_dump - Dump the adapter * ipr_read_dump - Dump the adapter
...@@ -4732,15 +4734,17 @@ static struct device_attribute ipr_raw_mode_attr = { ...@@ -4732,15 +4734,17 @@ static struct device_attribute ipr_raw_mode_attr = {
.store = ipr_store_raw_mode .store = ipr_store_raw_mode
}; };
static struct device_attribute *ipr_dev_attrs[] = { static struct attribute *ipr_dev_attrs[] = {
&ipr_adapter_handle_attr, &ipr_adapter_handle_attr.attr,
&ipr_resource_path_attr, &ipr_resource_path_attr.attr,
&ipr_device_id_attr, &ipr_device_id_attr.attr,
&ipr_resource_type_attr, &ipr_resource_type_attr.attr,
&ipr_raw_mode_attr, &ipr_raw_mode_attr.attr,
NULL, NULL,
}; };
ATTRIBUTE_GROUPS(ipr_dev);
/** /**
* ipr_biosparam - Return the HSC mapping * ipr_biosparam - Return the HSC mapping
* @sdev: scsi device struct * @sdev: scsi device struct
...@@ -6762,8 +6766,8 @@ static struct scsi_host_template driver_template = { ...@@ -6762,8 +6766,8 @@ static struct scsi_host_template driver_template = {
.sg_tablesize = IPR_MAX_SGLIST, .sg_tablesize = IPR_MAX_SGLIST,
.max_sectors = IPR_IOA_MAX_SECTORS, .max_sectors = IPR_IOA_MAX_SECTORS,
.cmd_per_lun = IPR_MAX_CMD_PER_LUN, .cmd_per_lun = IPR_MAX_CMD_PER_LUN,
.shost_attrs = ipr_ioa_attrs, .shost_groups = ipr_ioa_groups,
.sdev_attrs = ipr_dev_attrs, .sdev_groups = ipr_dev_groups,
.proc_name = IPR_NAME, .proc_name = IPR_NAME,
}; };
......
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