scsi: core: Remove Scsi_Host.shost_dev_attr_groups

Simplify the scsi_host_alloc() implementation by setting the shost_class
.dev_groups member instead of copying all host attribute group pointers
into the shost_dev_attr_groups[] array.

Link: https://lore.kernel.org/r/20211116223115.2103031-1-bvanassche@acm.org
Cc: Steffen Maier <maier@linux.ibm.com>
Cc: Damien Le Moal <damien.lemoal@wdc.com>
Suggested-by: Benjamin Block <bblock@linux.ibm.com>
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Bart Van Assche
2021-11-16 14:31:15 -08:00
committed by Martin K. Petersen
parent 54d816d3d3
commit 0a84486d6c
4 changed files with 10 additions and 20 deletions

View File

@@ -691,12 +691,6 @@ struct Scsi_Host {
/* ldm bits */
struct device shost_gendev, shost_dev;
/*
* The array size 3 provides space for one attribute group defined by
* the SCSI core, one attribute group defined by the SCSI LLD and one
* terminating NULL pointer.
*/
const struct attribute_group *shost_dev_attr_groups[3];
/*
* Points to the transport data (if any) which is allocated