mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-19 12:24:34 +08:00
scsi: qla4xxx: 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-42-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
66df386d0b
commit
a8b476fc86
@ -330,21 +330,30 @@ static DEVICE_ATTR(fw_ext_timestamp, S_IRUGO, qla4xxx_fw_ext_timestamp_show,
|
||||
static DEVICE_ATTR(fw_load_src, S_IRUGO, qla4xxx_fw_load_src_show, NULL);
|
||||
static DEVICE_ATTR(fw_uptime, S_IRUGO, qla4xxx_fw_uptime_show, NULL);
|
||||
|
||||
struct device_attribute *qla4xxx_host_attrs[] = {
|
||||
&dev_attr_fw_version,
|
||||
&dev_attr_serial_num,
|
||||
&dev_attr_iscsi_version,
|
||||
&dev_attr_optrom_version,
|
||||
&dev_attr_board_id,
|
||||
&dev_attr_fw_state,
|
||||
&dev_attr_phy_port_cnt,
|
||||
&dev_attr_phy_port_num,
|
||||
&dev_attr_iscsi_func_cnt,
|
||||
&dev_attr_hba_model,
|
||||
&dev_attr_fw_timestamp,
|
||||
&dev_attr_fw_build_user,
|
||||
&dev_attr_fw_ext_timestamp,
|
||||
&dev_attr_fw_load_src,
|
||||
&dev_attr_fw_uptime,
|
||||
static struct attribute *qla4xxx_host_attrs[] = {
|
||||
&dev_attr_fw_version.attr,
|
||||
&dev_attr_serial_num.attr,
|
||||
&dev_attr_iscsi_version.attr,
|
||||
&dev_attr_optrom_version.attr,
|
||||
&dev_attr_board_id.attr,
|
||||
&dev_attr_fw_state.attr,
|
||||
&dev_attr_phy_port_cnt.attr,
|
||||
&dev_attr_phy_port_num.attr,
|
||||
&dev_attr_iscsi_func_cnt.attr,
|
||||
&dev_attr_hba_model.attr,
|
||||
&dev_attr_fw_timestamp.attr,
|
||||
&dev_attr_fw_build_user.attr,
|
||||
&dev_attr_fw_ext_timestamp.attr,
|
||||
&dev_attr_fw_load_src.attr,
|
||||
&dev_attr_fw_uptime.attr,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static const struct attribute_group qla4xxx_host_attr_group = {
|
||||
.attrs = qla4xxx_host_attrs
|
||||
};
|
||||
|
||||
const struct attribute_group *qla4xxx_host_groups[] = {
|
||||
&qla4xxx_host_attr_group,
|
||||
NULL
|
||||
};
|
||||
|
@ -286,5 +286,6 @@ extern int ql4xenablemsix;
|
||||
extern int ql4xmdcapmask;
|
||||
extern int ql4xenablemd;
|
||||
|
||||
extern struct device_attribute *qla4xxx_host_attrs[];
|
||||
extern const struct attribute_group *qla4xxx_host_groups[];
|
||||
|
||||
#endif /* _QLA4x_GBL_H */
|
||||
|
@ -241,7 +241,7 @@ static struct scsi_host_template qla4xxx_driver_template = {
|
||||
.sg_tablesize = SG_ALL,
|
||||
|
||||
.max_sectors = 0xFFFF,
|
||||
.shost_attrs = qla4xxx_host_attrs,
|
||||
.shost_groups = qla4xxx_host_groups,
|
||||
.host_reset = qla4xxx_host_reset,
|
||||
.vendor_id = SCSI_NL_VID_TYPE_PCI | PCI_VENDOR_ID_QLOGIC,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user