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

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>

authored by

Bart Van Assche and committed by
Martin K. Petersen
e8fbc28e 4cd16323

+6 -4
+6 -4
drivers/scsi/hptiop.c
··· 1146 1146 .show = hptiop_show_fw_version, 1147 1147 }; 1148 1148 1149 - static struct device_attribute *hptiop_attrs[] = { 1150 - &hptiop_attr_version, 1151 - &hptiop_attr_fw_version, 1149 + static struct attribute *hptiop_host_attrs[] = { 1150 + &hptiop_attr_version.attr, 1151 + &hptiop_attr_fw_version.attr, 1152 1152 NULL 1153 1153 }; 1154 + 1155 + ATTRIBUTE_GROUPS(hptiop_host); 1154 1156 1155 1157 static int hptiop_slave_config(struct scsi_device *sdev) 1156 1158 { ··· 1170 1168 .info = hptiop_info, 1171 1169 .emulated = 0, 1172 1170 .proc_name = driver_name, 1173 - .shost_attrs = hptiop_attrs, 1171 + .shost_groups = hptiop_host_groups, 1174 1172 .slave_configure = hptiop_slave_config, 1175 1173 .this_id = -1, 1176 1174 .change_queue_depth = hptiop_adjust_disk_queue_depth,