From patchwork Tue Dec 2 05:55:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Jiada" X-Patchwork-Id: 5416901 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E66BB9F1C5 for ; Tue, 2 Dec 2014 05:56:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1C30A2026C for ; Tue, 2 Dec 2014 05:56:24 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id D455720295 for ; Tue, 2 Dec 2014 05:56:22 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id BDBDA2614A4; Tue, 2 Dec 2014 06:56:21 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id ED6DF260A50; Tue, 2 Dec 2014 06:55:24 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 3CDB1260A5B; Tue, 2 Dec 2014 06:55:24 +0100 (CET) Received: from relay1.mentorg.com (relay1.mentorg.com [192.94.38.131]) by alsa0.perex.cz (Postfix) with ESMTP id 348D7260649 for ; Tue, 2 Dec 2014 06:55:15 +0100 (CET) Received: from svr-orw-fem-02x.mgc.mentorg.com ([147.34.96.206] helo=SVR-ORW-FEM-02.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1XvgQc-0004QQ-8i from Jiada_Wang@mentor.com ; Mon, 01 Dec 2014 21:55:14 -0800 Received: from jiwang-OptiPlex-980.tokyo.mentorg.com (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.3.181.6; Mon, 1 Dec 2014 21:55:13 -0800 From: Jiada Wang To: , , , , , Date: Tue, 2 Dec 2014 14:55:07 +0900 Message-ID: <1417499707-3125-3-git-send-email-jiada_wang@mentor.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1417499707-3125-1-git-send-email-jiada_wang@mentor.com> References: <1417499707-3125-1-git-send-email-jiada_wang@mentor.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, tiwai@suse.de, linux-kernel@vger.kernel.org, lgirdwood@gmail.com, nicoleotsuka@gmail.com, Li.Xiubo@freescale.com, linuxppc-dev@lists.ozlabs.org Subject: [alsa-devel] [PATCH v2 2/2] ASoC: fsl_ssi: use platform_get_irq instead of irq_of_parse_and_map X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Use platform_get_irq as no mapping needs to be done. By using platform_get_irq, driver can avoid to free IRQ manually when SSI driver exits. Signed-off-by: Jiada Wang --- sound/soc/fsl/fsl_ssi.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index e19ed39..a7a9eb8 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -1363,7 +1363,7 @@ static int fsl_ssi_probe(struct platform_device *pdev) return PTR_ERR(ssi_private->regs); } - ssi_private->irq = irq_of_parse_and_map(np, 0); + ssi_private->irq = platform_get_irq(pdev, 0); if (!ssi_private->irq) { dev_err(&pdev->dev, "no irq for node %s\n", np->full_name); return -ENXIO; @@ -1389,7 +1389,7 @@ static int fsl_ssi_probe(struct platform_device *pdev) if (ssi_private->soc->imx) { ret = fsl_ssi_imx_probe(pdev, ssi_private, iomem); if (ret) - goto error_irqmap; + return ret; } ret = snd_soc_register_component(&pdev->dev, &fsl_ssi_component, @@ -1460,10 +1460,6 @@ error_asoc_register: if (ssi_private->soc->imx) fsl_ssi_imx_clean(pdev, ssi_private); -error_irqmap: - if (ssi_private->use_dma) - irq_dispose_mapping(ssi_private->irq); - return ret; } @@ -1480,9 +1476,6 @@ static int fsl_ssi_remove(struct platform_device *pdev) if (ssi_private->soc->imx) fsl_ssi_imx_clean(pdev, ssi_private); - if (ssi_private->use_dma) - irq_dispose_mapping(ssi_private->irq); - return 0; }