From patchwork Tue Apr 11 05:53:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9674595 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E667260382 for ; Tue, 11 Apr 2017 06:07:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D095D2849A for ; Tue, 11 Apr 2017 06:07:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C3FB0284F4; Tue, 11 Apr 2017 06:07:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C38C2849A for ; Tue, 11 Apr 2017 06:07:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752711AbdDKGHe (ORCPT ); Tue, 11 Apr 2017 02:07:34 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:35028 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752267AbdDKGHd (ORCPT ); Tue, 11 Apr 2017 02:07:33 -0400 Received: by mail-wr0-f193.google.com with SMTP id l44so4279663wrc.2 for ; Mon, 10 Apr 2017 23:07:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=9mpXLpZFjaGNthrVrfjvvtjZQrbIF4MfXFHDRibtGiA=; b=VMJ/TF6EOzHSApPJvfCRVWhHDxQRgV4ISk4sS7Nbh86kq2ytZw5FrNkWZL6VVjLEzg F0CGmoHB7JTaupnn/L+aAmpyOa24we3oAJCBACHA8b1WEZIGA6rN3XK9hXTbWwhBTfZE BBYxUexG7LcTNfOps1JhEgyA0mkD7PMjZUEwqtGGNs0R4N7Rvm+bL/09QUFLtLfpsvCf gNiUVwr/1g358UwxlpmBROrlB/1in9oECG8ZGGqf/j9nGujNJBmc9qisRaKelxVM9S6u fCnG5NjCPMz8PE5dxEVOrYch7jaKApCi4inxATY6xUQQNq1JNOSs3U836OgPIyJdpEMo ph3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=9mpXLpZFjaGNthrVrfjvvtjZQrbIF4MfXFHDRibtGiA=; b=EkKIUkN8wJKFOfGf7A9PTpe6qMz+wiXYWWZyjymmE1sCZcqHbKgCepvHNEd/15H63o P+jsKp4yQI/+eR50Md9F9Yld9JN+euGwd25FRJgIg3JgZ6yrxXG2cnyYbPeZr6TWZIVo LSGbCgkEUEy5/JoVNbKt9MGQe2ArHpMaEcmKqpogNSe89Jrt/BrF48jEF9yBcSYRHRrJ 0BuqTxYtEFtNpiQZV/A1Gurb9TODOIHMZM/RRGsgatYl9723ClWuVfashNNp58O8eVR+ GyaPg0pBtWKdphnZSZRrWrAMJzM58Nqtb5Z9toU2tQezr1BtiwsAJf3XzqA+3LQ2OSXR Gssw== X-Gm-Message-State: AN3rC/49vBgJNJ3BITH9USLI4suYFw8ZwHGhkgcUVO7FiBz63lMesTw7arr7njz72LU8Xw== X-Received: by 10.223.170.194 with SMTP id i2mr10624405wrc.44.1491890852292; Mon, 10 Apr 2017 23:07:32 -0700 (PDT) Received: from ?IPv6:2003:c6:ebdc:4000:4d95:3656:1b99:b390? (p200300C6EBDC40004D9536561B99B390.dip0.t-ipconnect.de. [2003:c6:ebdc:4000:4d95:3656:1b99:b390]) by smtp.googlemail.com with ESMTPSA id w186sm1030087wme.26.2017.04.10.23.07.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Apr 2017 23:07:31 -0700 (PDT) Subject: [PATCH 1/5] media: rc: meson-ir: remove irq from struct meson_ir From: Heiner Kallweit To: Mauro Carvalho Chehab , Sean Young , Kevin Hilman Cc: linux-media@vger.kernel.org, linux-amlogic@lists.infradead.org References: Message-ID: Date: Tue, 11 Apr 2017 07:53:42 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 In-Reply-To: Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The irq number is used in the probe function only, therefore just use a local variable. Signed-off-by: Heiner Kallweit --- drivers/media/rc/meson-ir.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/media/rc/meson-ir.c b/drivers/media/rc/meson-ir.c index 5576dbd6..a4128d7c 100644 --- a/drivers/media/rc/meson-ir.c +++ b/drivers/media/rc/meson-ir.c @@ -68,7 +68,6 @@ struct meson_ir { void __iomem *reg; struct rc_dev *rc; - int irq; spinlock_t lock; }; @@ -112,7 +111,7 @@ static int meson_ir_probe(struct platform_device *pdev) struct resource *res; const char *map_name; struct meson_ir *ir; - int ret; + int irq, ret; ir = devm_kzalloc(dev, sizeof(struct meson_ir), GFP_KERNEL); if (!ir) @@ -125,10 +124,10 @@ static int meson_ir_probe(struct platform_device *pdev) return PTR_ERR(ir->reg); } - ir->irq = platform_get_irq(pdev, 0); - if (ir->irq < 0) { + irq = platform_get_irq(pdev, 0); + if (irq < 0) { dev_err(dev, "no irq resource\n"); - return ir->irq; + return irq; } ir->rc = rc_allocate_device(RC_DRIVER_IR_RAW); @@ -158,7 +157,7 @@ static int meson_ir_probe(struct platform_device *pdev) goto out_free; } - ret = devm_request_irq(dev, ir->irq, meson_ir_irq, 0, "ir-meson", ir); + ret = devm_request_irq(dev, irq, meson_ir_irq, 0, "ir-meson", ir); if (ret) { dev_err(dev, "failed to request irq\n"); goto out_unreg;