mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-03 17:40:04 +00:00
scsi: hisi_sas: 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-21-bvanassche@acm.org Acked-by: John Garry <john.garry@huawei.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:
parent
d6ddcd8b38
commit
62ac8ccbb8
3 changed files with 18 additions and 12 deletions
|
@ -1742,11 +1742,13 @@ static int hisi_sas_v1_init(struct hisi_hba *hisi_hba)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static struct device_attribute *host_attrs_v1_hw[] = {
|
||||
&dev_attr_phy_event_threshold,
|
||||
static struct attribute *host_v1_hw_attrs[] = {
|
||||
&dev_attr_phy_event_threshold.attr,
|
||||
NULL
|
||||
};
|
||||
|
||||
ATTRIBUTE_GROUPS(host_v1_hw);
|
||||
|
||||
static struct scsi_host_template sht_v1_hw = {
|
||||
.name = DRV_NAME,
|
||||
.proc_name = DRV_NAME,
|
||||
|
@ -1770,7 +1772,7 @@ static struct scsi_host_template sht_v1_hw = {
|
|||
#ifdef CONFIG_COMPAT
|
||||
.compat_ioctl = sas_ioctl,
|
||||
#endif
|
||||
.shost_attrs = host_attrs_v1_hw,
|
||||
.shost_groups = host_v1_hw_groups,
|
||||
.host_reset = hisi_sas_host_reset,
|
||||
};
|
||||
|
||||
|
|
|
@ -3531,11 +3531,13 @@ static void wait_cmds_complete_timeout_v2_hw(struct hisi_hba *hisi_hba,
|
|||
|
||||
}
|
||||
|
||||
static struct device_attribute *host_attrs_v2_hw[] = {
|
||||
&dev_attr_phy_event_threshold,
|
||||
static struct attribute *host_v2_hw_attrs[] = {
|
||||
&dev_attr_phy_event_threshold.attr,
|
||||
NULL
|
||||
};
|
||||
|
||||
ATTRIBUTE_GROUPS(host_v2_hw);
|
||||
|
||||
static int map_queues_v2_hw(struct Scsi_Host *shost)
|
||||
{
|
||||
struct hisi_hba *hisi_hba = shost_priv(shost);
|
||||
|
@ -3579,7 +3581,7 @@ static struct scsi_host_template sht_v2_hw = {
|
|||
#ifdef CONFIG_COMPAT
|
||||
.compat_ioctl = sas_ioctl,
|
||||
#endif
|
||||
.shost_attrs = host_attrs_v2_hw,
|
||||
.shost_groups = host_v2_hw_groups,
|
||||
.host_reset = hisi_sas_host_reset,
|
||||
.map_queues = map_queues_v2_hw,
|
||||
.host_tagset = 1,
|
||||
|
|
|
@ -2766,14 +2766,16 @@ static int slave_configure_v3_hw(struct scsi_device *sdev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static struct device_attribute *host_attrs_v3_hw[] = {
|
||||
&dev_attr_phy_event_threshold,
|
||||
&dev_attr_intr_conv_v3_hw,
|
||||
&dev_attr_intr_coal_ticks_v3_hw,
|
||||
&dev_attr_intr_coal_count_v3_hw,
|
||||
static struct attribute *host_v3_hw_attrs[] = {
|
||||
&dev_attr_phy_event_threshold.attr,
|
||||
&dev_attr_intr_conv_v3_hw.attr,
|
||||
&dev_attr_intr_coal_ticks_v3_hw.attr,
|
||||
&dev_attr_intr_coal_count_v3_hw.attr,
|
||||
NULL
|
||||
};
|
||||
|
||||
ATTRIBUTE_GROUPS(host_v3_hw);
|
||||
|
||||
#define HISI_SAS_DEBUGFS_REG(x) {#x, x}
|
||||
|
||||
struct hisi_sas_debugfs_reg_lu {
|
||||
|
@ -3158,7 +3160,7 @@ static struct scsi_host_template sht_v3_hw = {
|
|||
#ifdef CONFIG_COMPAT
|
||||
.compat_ioctl = sas_ioctl,
|
||||
#endif
|
||||
.shost_attrs = host_attrs_v3_hw,
|
||||
.shost_groups = host_v3_hw_groups,
|
||||
.tag_alloc_policy = BLK_TAG_ALLOC_RR,
|
||||
.host_reset = hisi_sas_host_reset,
|
||||
.host_tagset = 1,
|
||||
|
|
Loading…
Reference in a new issue