From patchwork Wed Apr 12 19:28: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: 9678285 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 25621601C3 for ; Wed, 12 Apr 2017 19:35:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 11DAC28615 for ; Wed, 12 Apr 2017 19:35:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0472928641; Wed, 12 Apr 2017 19:35:15 +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 802AF2861A for ; Wed, 12 Apr 2017 19:35:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754615AbdDLTfM (ORCPT ); Wed, 12 Apr 2017 15:35:12 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:36277 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753771AbdDLTfL (ORCPT ); Wed, 12 Apr 2017 15:35:11 -0400 Received: by mail-wr0-f195.google.com with SMTP id o21so5718894wrb.3 for ; Wed, 12 Apr 2017 12:35:11 -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=b+DT0clIQ5iI9u9NPzBrX0xmRRel1HJbqCGglYFyjdI=; b=VgM8QFVpZ1Dz5gBxz+2M3Ol+Crj+5os2TUApmtHxs22m+q2CtRHpIUKCp/KOkAEF5q SqOjiwsPHDRRruTB50rVaksGBaJttwqb7z6isewDiwIF7iJPV+i6LOCQxbXzXUij4NiL mkoi1KZJ0CtnsgJ+kkbYlVWvXStK2Ys4argn31pCOvFo0yuj4TnH/oMDnTujS9yxfFp6 d36wCmGRwzYYNFY/jxX+1fqjScRLEggeXuTt3dW2e1wnKx93ihXGJoFjC2gotw3tveqX 1+8xDy2caV9WWEPe1j1TJe0P+ZZgVoKWuOHlz/2NfNm1YGqlqIT3Jt3y11sI414Q3WDK FT1Q== 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=b+DT0clIQ5iI9u9NPzBrX0xmRRel1HJbqCGglYFyjdI=; b=ljnJQfzsXiXOE0qeMFQzvjT8Ef7Mr1XDD4BbbsTU9YBb1b9GimVWda4veVhwuTp84q Ly3g7v7e6FhVdZDB6Ym4f4MQLRRlp5GJw8x9v5R10B+CgLq8uiQWECG3qMxqYlTVzSs5 c8FMf1E3cMN4iMu/hATQkmQ0cglG3eWBz9X2Zo/F+AfJKShQN9wS8beaiByKgZ0+pX1X BKnrLjfWMMfrfp7mefEjJ9HFZbf/YBYb20UXnWAE843l0mmx+9FfLbTtYRhSsumhCHso bmLDhby4hG1HcD2U6z0kDg7HxX2mjeiXQuBOcAsMdoeNjvgwWL7DfthiwJC/a2MWzYeG sR3w== X-Gm-Message-State: AN3rC/6cge5wuWp2w24lBzuE/RHQksCFfS884mVN3lLqYMZxifWuYW7GWOlOmwHa9FTCCA== X-Received: by 10.223.172.129 with SMTP id o1mr4177688wrc.121.1492025710473; Wed, 12 Apr 2017 12:35:10 -0700 (PDT) Received: from ?IPv6:2003:c6:ebdc:4000:f514:8038:dab0:5880? (p200300C6EBDC4000F5148038DAB05880.dip0.t-ipconnect.de. [2003:c6:ebdc:4000:f514:8038:dab0:5880]) by smtp.googlemail.com with ESMTPSA id u47sm22077365wrb.27.2017.04.12.12.35.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Apr 2017 12:35:10 -0700 (PDT) Subject: [PATCH v2 1/5] media: rc: meson-ir: remove irq from struct meson_ir From: Heiner Kallweit To: Mauro Carvalho Chehab , Sean Young , Kevin Hilman , Neil Armstrong Cc: linux-media@vger.kernel.org, linux-amlogic@lists.infradead.org References: Message-ID: Date: Wed, 12 Apr 2017 21:28: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 --- v2: - no changes --- 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;