diff options
author | Bart Van Assche <bvanassche@acm.org> | 2021-10-13 02:35:34 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-10-17 04:45:55 +0300 |
commit | e8fbc28e7fc71da2c820a5d3db49ca9bef7f4f3e (patch) | |
tree | a8eb016233df49c75ef8ffb8d7963660fa3e0acf /drivers/scsi | |
parent | 4cd16323b5236e92636720f3591db3ce61c45955 (diff) | |
download | linux-e8fbc28e7fc71da2c820a5d3db49ca9bef7f4f3e.tar.xz |
scsi: hptiop: 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-23-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')
-rw-r--r-- | drivers/scsi/hptiop.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c index f9a9def394cc..d04245e379d7 100644 --- a/drivers/scsi/hptiop.c +++ b/drivers/scsi/hptiop.c @@ -1146,12 +1146,14 @@ static struct device_attribute hptiop_attr_fw_version = { .show = hptiop_show_fw_version, }; -static struct device_attribute *hptiop_attrs[] = { - &hptiop_attr_version, - &hptiop_attr_fw_version, +static struct attribute *hptiop_host_attrs[] = { + &hptiop_attr_version.attr, + &hptiop_attr_fw_version.attr, NULL }; +ATTRIBUTE_GROUPS(hptiop_host); + static int hptiop_slave_config(struct scsi_device *sdev) { if (sdev->type == TYPE_TAPE) @@ -1168,7 +1170,7 @@ static struct scsi_host_template driver_template = { .info = hptiop_info, .emulated = 0, .proc_name = driver_name, - .shost_attrs = hptiop_attrs, + .shost_groups = hptiop_host_groups, .slave_configure = hptiop_slave_config, .this_id = -1, .change_queue_depth = hptiop_adjust_disk_queue_depth, |