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

scsi: 3w-xxxx: 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-10-bvanassche@acm.orgSigned-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 8de1cc90
...@@ -532,11 +532,13 @@ static struct device_attribute tw_host_stats_attr = { ...@@ -532,11 +532,13 @@ static struct device_attribute tw_host_stats_attr = {
}; };
/* Host attributes initializer */ /* Host attributes initializer */
static struct device_attribute *tw_host_attrs[] = { static struct attribute *tw_host_attrs[] = {
&tw_host_stats_attr, &tw_host_stats_attr.attr,
NULL, NULL,
}; };
ATTRIBUTE_GROUPS(tw_host);
/* This function will read the aen queue from the isr */ /* This function will read the aen queue from the isr */
static int tw_aen_read_queue(TW_Device_Extension *tw_dev, int request_id) static int tw_aen_read_queue(TW_Device_Extension *tw_dev, int request_id)
{ {
...@@ -2240,7 +2242,7 @@ static struct scsi_host_template driver_template = { ...@@ -2240,7 +2242,7 @@ static struct scsi_host_template driver_template = {
.sg_tablesize = TW_MAX_SGL_LENGTH, .sg_tablesize = TW_MAX_SGL_LENGTH,
.max_sectors = TW_MAX_SECTORS, .max_sectors = TW_MAX_SECTORS,
.cmd_per_lun = TW_MAX_CMDS_PER_LUN, .cmd_per_lun = TW_MAX_CMDS_PER_LUN,
.shost_attrs = tw_host_attrs, .shost_groups = tw_host_groups,
.emulated = 1, .emulated = 1,
.no_write_same = 1, .no_write_same = 1,
}; };
......
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