summaryrefslogtreecommitdiff
path: root/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
diff options
context:
space:
mode:
authorJohn Garry <john.garry@huawei.com>2015-11-19 12:23:59 (GMT)
committerMartin K. Petersen <martin.petersen@oracle.com>2015-11-26 03:13:09 (GMT)
commit8c77dca011125b795bfa1c86f85a80132feee578 (patch)
tree9afa810b29d40c338380a3f30b8a6cf4e97e3fef /drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
parent16c6c252f0ac8256e38d36a3de7c59d5d27efdc3 (diff)
downloadlinux-8c77dca011125b795bfa1c86f85a80132feee578.tar.xz
hisi_sas: Remove dependency on of_irq_count
Originally the driver would use of_irq_count to calculate how much memory is required for storing the interrupt names, since the number of interrupt sources for the controller is variable. Since of_irq_count cannot be used by the driver, use fixed names. Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/hisi_sas/hisi_sas_v1_hw.c')
-rw-r--r--drivers/scsi/hisi_sas/hisi_sas_v1_hw.c34
1 files changed, 5 insertions, 29 deletions
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
index e29b7c7..0ed2f92 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
@@ -1660,18 +1660,6 @@ static irqreturn_t fatal_axi_int_v1_hw(int irq, void *p)
return IRQ_HANDLED;
}
-static const char phy_int_names[HISI_SAS_PHY_INT_NR][32] = {
- {"Bcast"},
- {"Phy Up"},
- {"Abnormal"},
-};
-
-static const char cq_int_name[32] = "cq";
-static const char fatal_int_name[HISI_SAS_FATAL_INT_NR][32] = {
- "fatal ecc",
- "fatal axi"
-};
-
static irq_handler_t phy_interrupts[HISI_SAS_PHY_INT_NR] = {
int_bcast_v1_hw,
int_phyup_v1_hw,
@@ -1687,7 +1675,6 @@ static int interrupt_init_v1_hw(struct hisi_hba *hisi_hba)
{
struct device *dev = &hisi_hba->pdev->dev;
struct device_node *np = dev->of_node;
- char *int_names = hisi_hba->int_names;
int i, j, irq, rc, idx;
if (!np)
@@ -1706,13 +1693,8 @@ static int interrupt_init_v1_hw(struct hisi_hba *hisi_hba)
return -ENOENT;
}
- (void)snprintf(&int_names[idx * HISI_SAS_NAME_LEN],
- HISI_SAS_NAME_LEN,
- "%s %s:%d", dev_name(dev),
- phy_int_names[j], i);
rc = devm_request_irq(dev, irq, phy_interrupts[j], 0,
- &int_names[idx * HISI_SAS_NAME_LEN],
- phy);
+ DRV_NAME " phy", phy);
if (rc) {
dev_err(dev, "irq init: could not request "
"phy interrupt %d, rc=%d\n",
@@ -1730,12 +1712,9 @@ static int interrupt_init_v1_hw(struct hisi_hba *hisi_hba)
idx);
return -ENOENT;
}
- (void)snprintf(&int_names[idx * HISI_SAS_NAME_LEN],
- HISI_SAS_NAME_LEN,
- "%s %s:%d", dev_name(dev), cq_int_name, i);
+
rc = devm_request_irq(dev, irq, cq_interrupt_v1_hw, 0,
- &int_names[idx * HISI_SAS_NAME_LEN],
- &hisi_hba->cq[i]);
+ DRV_NAME " cq", &hisi_hba->cq[i]);
if (rc) {
dev_err(dev, "irq init: could not request cq interrupt %d, rc=%d\n",
irq, rc);
@@ -1751,12 +1730,9 @@ static int interrupt_init_v1_hw(struct hisi_hba *hisi_hba)
idx);
return -ENOENT;
}
- (void)snprintf(&int_names[idx * HISI_SAS_NAME_LEN],
- HISI_SAS_NAME_LEN,
- "%s %s:%d", dev_name(dev), fatal_int_name[i], i);
+
rc = devm_request_irq(dev, irq, fatal_interrupts[i], 0,
- &int_names[idx * HISI_SAS_NAME_LEN],
- hisi_hba);
+ DRV_NAME " fatal", hisi_hba);
if (rc) {
dev_err(dev,
"irq init: could not request fatal interrupt %d, rc=%d\n",