mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-17 02:15:57 +00:00
scsi: 3w-9xxx: 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-8-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
d8d7cf3f7d
commit
bd21c1e989
@ -197,11 +197,13 @@ static struct device_attribute twa_host_stats_attr = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* Host attributes initializer */
|
/* Host attributes initializer */
|
||||||
static struct device_attribute *twa_host_attrs[] = {
|
static struct attribute *twa_host_attrs[] = {
|
||||||
&twa_host_stats_attr,
|
&twa_host_stats_attr.attr,
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ATTRIBUTE_GROUPS(twa_host);
|
||||||
|
|
||||||
/* File operations struct for character device */
|
/* File operations struct for character device */
|
||||||
static const struct file_operations twa_fops = {
|
static const struct file_operations twa_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
@ -1988,7 +1990,7 @@ static struct scsi_host_template driver_template = {
|
|||||||
.sg_tablesize = TW_APACHE_MAX_SGL_LENGTH,
|
.sg_tablesize = TW_APACHE_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 = twa_host_attrs,
|
.shost_groups = twa_host_groups,
|
||||||
.emulated = 1,
|
.emulated = 1,
|
||||||
.no_write_same = 1,
|
.no_write_same = 1,
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user