From patchwork Fri Dec 11 12:03:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 58272 Delivered-To: patch@linaro.org Received: by 10.112.157.166 with SMTP id wn6csp77770lbb; Fri, 11 Dec 2015 03:48:34 -0800 (PST) X-Received: by 10.98.75.204 with SMTP id d73mr14435961pfj.90.1449834514397; Fri, 11 Dec 2015 03:48:34 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l65si837311pfi.193.2015.12.11.03.48.34; Fri, 11 Dec 2015 03:48:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755046AbbLKLs3 (ORCPT + 28 others); Fri, 11 Dec 2015 06:48:29 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:60170 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754879AbbLKLs0 (ORCPT ); Fri, 11 Dec 2015 06:48:26 -0500 Received: from 172.24.1.47 (EHLO szxeml433-hub.china.huawei.com) ([172.24.1.47]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id BSP18619; Fri, 11 Dec 2015 19:48:17 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by szxeml433-hub.china.huawei.com (10.82.67.210) with Microsoft SMTP Server id 14.3.235.1; Fri, 11 Dec 2015 19:48:05 +0800 From: John Garry To: , CC: , , , , , , , , John Garry Subject: [PATCH v2] hisi_sas: use platform_get_irq() Date: Fri, 11 Dec 2015 20:03:21 +0800 Message-ID: <1449835401-200442-1-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.67.212.75] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020205.566AB803.01A2, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 45cf00e7f3002dfe72bfc234c8359946 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It is preferred that drivers use platform_get_irq() instead of irq_of_parse_and_map(), so replace. Signed-off-by: John Garry Acked-by: Rob Herring -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h index 30a9ab9..5af2e41 100644 --- a/drivers/scsi/hisi_sas/hisi_sas.h +++ b/drivers/scsi/hisi_sas/hisi_sas.h @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c index 0ed2f92..d543811 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c @@ -1673,19 +1673,16 @@ static irq_handler_t fatal_interrupts[HISI_SAS_MAX_QUEUES] = { 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; + struct platform_device *pdev = hisi_hba->pdev; + struct device *dev = &pdev->dev; int i, j, irq, rc, idx; - if (!np) - return -ENOENT; - for (i = 0; i < hisi_hba->n_phy; i++) { struct hisi_sas_phy *phy = &hisi_hba->phy[i]; idx = i * HISI_SAS_PHY_INT_NR; for (j = 0; j < HISI_SAS_PHY_INT_NR; j++, idx++) { - irq = irq_of_parse_and_map(np, idx); + irq = platform_get_irq(pdev, idx); if (!irq) { dev_err(dev, "irq init: fail map phy interrupt %d\n", @@ -1706,7 +1703,7 @@ static int interrupt_init_v1_hw(struct hisi_hba *hisi_hba) idx = hisi_hba->n_phy * HISI_SAS_PHY_INT_NR; for (i = 0; i < hisi_hba->queue_count; i++, idx++) { - irq = irq_of_parse_and_map(np, idx); + irq = platform_get_irq(pdev, idx); if (!irq) { dev_err(dev, "irq init: could not map cq interrupt %d\n", idx); @@ -1724,7 +1721,7 @@ static int interrupt_init_v1_hw(struct hisi_hba *hisi_hba) idx = (hisi_hba->n_phy * HISI_SAS_PHY_INT_NR) + hisi_hba->queue_count; for (i = 0; i < HISI_SAS_FATAL_INT_NR; i++, idx++) { - irq = irq_of_parse_and_map(np, idx); + irq = platform_get_irq(pdev, idx); if (!irq) { dev_err(dev, "irq init: could not map fatal interrupt %d\n", idx);