Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Bart Van Assche and committed by
Martin K. Petersen
bd21c1e9 d8d7cf3f

+5 -3
+5 -3
drivers/scsi/3w-9xxx.c
··· 197 197 }; 198 198 199 199 /* Host attributes initializer */ 200 - static struct device_attribute *twa_host_attrs[] = { 201 - &twa_host_stats_attr, 200 + static struct attribute *twa_host_attrs[] = { 201 + &twa_host_stats_attr.attr, 202 202 NULL, 203 203 }; 204 + 205 + ATTRIBUTE_GROUPS(twa_host); 204 206 205 207 /* File operations struct for character device */ 206 208 static const struct file_operations twa_fops = { ··· 1990 1988 .sg_tablesize = TW_APACHE_MAX_SGL_LENGTH, 1991 1989 .max_sectors = TW_MAX_SECTORS, 1992 1990 .cmd_per_lun = TW_MAX_CMDS_PER_LUN, 1993 - .shost_attrs = twa_host_attrs, 1991 + .shost_groups = twa_host_groups, 1994 1992 .emulated = 1, 1995 1993 .no_write_same = 1, 1996 1994 };