diff options
author | Bart Van Assche <bvanassche@acm.org> | 2021-10-13 01:35:36 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-10-17 03:45:56 +0200 |
commit | 7adbf68f4950794519ccd462ba0c336a65ea3701 (patch) | |
tree | 3a4c0851368464ad6c40dc68d4697a50ebfe55f3 /drivers/scsi/ibmvscsi | |
parent | scsi: ibmvscsi: Switch to attribute groups (diff) | |
download | linux-7adbf68f4950794519ccd462ba0c336a65ea3701.tar.xz linux-7adbf68f4950794519ccd462ba0c336a65ea3701.zip |
scsi: ibmvfc: 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-25-bvanassche@acm.org
Acked-by: Tyrel Datwyler <tyreld@linux.ibm.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ibmvscsi')
-rw-r--r-- | drivers/scsi/ibmvscsi/ibmvfc.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 63f42eebe0ba..a4b0a12f8a97 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c @@ -3588,18 +3588,20 @@ static struct bin_attribute ibmvfc_trace_attr = { }; #endif -static struct device_attribute *ibmvfc_attrs[] = { - &dev_attr_partition_name, - &dev_attr_device_name, - &dev_attr_port_loc_code, - &dev_attr_drc_name, - &dev_attr_npiv_version, - &dev_attr_capabilities, - &dev_attr_log_level, - &dev_attr_nr_scsi_channels, +static struct attribute *ibmvfc_host_attrs[] = { + &dev_attr_partition_name.attr, + &dev_attr_device_name.attr, + &dev_attr_port_loc_code.attr, + &dev_attr_drc_name.attr, + &dev_attr_npiv_version.attr, + &dev_attr_capabilities.attr, + &dev_attr_log_level.attr, + &dev_attr_nr_scsi_channels.attr, NULL }; +ATTRIBUTE_GROUPS(ibmvfc_host); + static struct scsi_host_template driver_template = { .module = THIS_MODULE, .name = "IBM POWER Virtual FC Adapter", @@ -3620,7 +3622,7 @@ static struct scsi_host_template driver_template = { .this_id = -1, .sg_tablesize = SG_ALL, .max_sectors = IBMVFC_MAX_SECTORS, - .shost_attrs = ibmvfc_attrs, + .shost_groups = ibmvfc_host_groups, .track_queue_depth = 1, .host_tagset = 1, }; |