summaryrefslogtreecommitdiff
path: root/drivers/scsi/aic94xx
diff options
context:
space:
mode:
authorJohn Garry <john.garry@huawei.com>2019-06-10 20:41:41 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2019-06-20 15:37:02 -0400
commit924a3541eab0d28101baf0831e4315593f06ba4a (patch)
treeda4ef5d394c324e91279650a8cc4ee34da7b3694 /drivers/scsi/aic94xx
parent895d8860a1a9b13ebddccb76a70faf4c01081699 (diff)
scsi: libsas: aic94xx: hisi_sas: mvsas: pm8001: Use dev_is_expander()
Many times in libsas, and in LLDDs which use libsas, the check for an expander device is re-implemented or open coded. Use dev_is_expander() instead. We rename this from sas_dev_type_is_expander() to not spill so many lines in referencing. Signed-off-by: John Garry <john.garry@huawei.com> Reviewed-by: Jason Yan <yanaijie@huawei.com> Reviewed-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/aic94xx')
-rw-r--r--drivers/scsi/aic94xx/aic94xx_dev.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/scsi/aic94xx/aic94xx_dev.c b/drivers/scsi/aic94xx/aic94xx_dev.c
index 33072388ea16..e528a2ce9602 100644
--- a/drivers/scsi/aic94xx/aic94xx_dev.c
+++ b/drivers/scsi/aic94xx/aic94xx_dev.c
@@ -187,9 +187,7 @@ static int asd_init_target_ddb(struct domain_device *dev)
}
} else {
flags |= CONCURRENT_CONN_SUPP;
- if (!dev->parent &&
- (dev->dev_type == SAS_EDGE_EXPANDER_DEVICE ||
- dev->dev_type == SAS_FANOUT_EXPANDER_DEVICE))
+ if (!dev->parent && dev_is_expander(dev->dev_type))
asd_ddbsite_write_byte(asd_ha, ddb, MAX_CCONN,
4);
else