From patchwork Tue Dec 30 14:11:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 5552301 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BE8ADBF6C3 for ; Tue, 30 Dec 2014 14:12:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EF15620173 for ; Tue, 30 Dec 2014 14:12:19 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id C00D420160 for ; Tue, 30 Dec 2014 14:12:18 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 5963A26066D; Tue, 30 Dec 2014 15:12:17 +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.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NO_DNS_FOR_FROM, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 1799A260633; Tue, 30 Dec 2014 15:12:07 +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 91DCB260633; Tue, 30 Dec 2014 15:12:05 +0100 (CET) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by alsa0.perex.cz (Postfix) with ESMTP id A5F6626063E for ; Tue, 30 Dec 2014 15:11:56 +0100 (CET) Received: by mail-vc0-f179.google.com with SMTP id le20so5625846vcb.24 for ; Tue, 30 Dec 2014 06:11:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=/BiRq4wNGgKckC/2mCDEr29doEhYeq2Jkc2QxHXuDEw=; b=WxzdxoVHjKqKRJCzipB4RjrpzeXuid/LiGA25bnO+CQlMcCeGchOsYghZOBhw4DGJ2 n1nU6nNtRQQEUnAw4XDknVWVeMTWB3JIR5x0OtWXg1X3U/uiURyUseUY0TJ4FrtXdb3A u6Wf9a8XETTAy9J+Yva0f/g+CN8WUX6+8xFUCp+3ulhjAOjEa+kj8ww2/84pyypUwohL NSgusqxL038Qz9Md+sTy3sPQ9lispSMyKCeiKwiBKgvMX0bYAqmJuu0AfUmZMzFHVPCb 1GOobn5DHimgW/D20jJypSxky9SXVYNXIEtmgFtjbSnxz240pKzC6mMhtM3fI6QYtIfO FM/Q== X-Received: by 10.220.128.71 with SMTP id j7mr35134578vcs.22.1419948715460; Tue, 30 Dec 2014 06:11:55 -0800 (PST) Received: from localhost.localdomain ([189.101.176.228]) by mx.google.com with ESMTPSA id nj12sm10996527vdb.19.2014.12.30.06.11.53 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 30 Dec 2014 06:11:54 -0800 (PST) From: Fabio Estevam To: broonie@kernel.org Date: Tue, 30 Dec 2014 12:11:36 -0200 Message-Id: <1419948696-18529-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.9.1 Cc: Fabio Estevam , alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH] ASoC: mxs-saif: Do not store the irq number in the private structure 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fabio Estevam The irq number is only used inside the probe function, so there is really no need to store it in the private structure. Use a local 'irq' variable to hold the the irq number instead. Signed-off-by: Fabio Estevam --- sound/soc/mxs/mxs-saif.c | 10 +++++----- sound/soc/mxs/mxs-saif.h | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c index d986508..c866ade 100644 --- a/sound/soc/mxs/mxs-saif.c +++ b/sound/soc/mxs/mxs-saif.c @@ -710,7 +710,7 @@ static int mxs_saif_probe(struct platform_device *pdev) struct device_node *np = pdev->dev.of_node; struct resource *iores; struct mxs_saif *saif; - int ret = 0; + int irq, ret = 0; struct device_node *master; if (!np) @@ -763,16 +763,16 @@ static int mxs_saif_probe(struct platform_device *pdev) if (IS_ERR(saif->base)) return PTR_ERR(saif->base); - saif->irq = platform_get_irq(pdev, 0); - if (saif->irq < 0) { - ret = saif->irq; + irq = platform_get_irq(pdev, 0); + if (irq < 0) { + ret = irq; dev_err(&pdev->dev, "failed to get irq resource: %d\n", ret); return ret; } saif->dev = &pdev->dev; - ret = devm_request_irq(&pdev->dev, saif->irq, mxs_saif_irq, 0, + ret = devm_request_irq(&pdev->dev, irq, mxs_saif_irq, 0, dev_name(&pdev->dev), saif); if (ret) { dev_err(&pdev->dev, "failed to request irq\n"); diff --git a/sound/soc/mxs/mxs-saif.h b/sound/soc/mxs/mxs-saif.h index fbaf7ba..9a4c0b2 100644 --- a/sound/soc/mxs/mxs-saif.h +++ b/sound/soc/mxs/mxs-saif.h @@ -116,7 +116,6 @@ struct mxs_saif { unsigned int mclk; unsigned int mclk_in_use; void __iomem *base; - int irq; unsigned int id; unsigned int master_id; unsigned int cur_rate;