From patchwork Wed Mar 18 18:41:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 6042831 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@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 1B754BF90F for ; Wed, 18 Mar 2015 18:41:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 40F9C20414 for ; Wed, 18 Mar 2015 18:41:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6455F203DA for ; Wed, 18 Mar 2015 18:41:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755211AbbCRSlL (ORCPT ); Wed, 18 Mar 2015 14:41:11 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:52595 "EHLO baptiste.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752981AbbCRSlL (ORCPT ); Wed, 18 Mar 2015 14:41:11 -0400 Received: from ayla.of.borg ([84.193.93.87]) by baptiste.telenet-ops.be with bizsmtp id 56h91q00A1t5w8s016h9E4; Wed, 18 Mar 2015 19:41:09 +0100 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.82) (envelope-from ) id 1YYItw-0007ru-Tp; Wed, 18 Mar 2015 19:41:09 +0100 Received: from geert by ramsan with local (Exim 4.82) (envelope-from ) id 1YYIty-0006sL-Ah; Wed, 18 Mar 2015 19:41:10 +0100 From: Geert Uytterhoeven To: Linus Walleij , Alexandre Courbot Cc: linux-gpio@vger.kernel.org, linux-sh@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 1/3] gpio: rcar: Use local variable gpio_chip in gpio_rcar_probe() Date: Wed, 18 Mar 2015 19:41:07 +0100 Message-Id: <1426704069-26389-2-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1426704069-26389-1-git-send-email-geert+renesas@glider.be> References: <1426704069-26389-1-git-send-email-geert+renesas@glider.be> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The existing variable gpio_chip already points to the gpiochip instance, hence use it everywhere. Signed-off-by: Geert Uytterhoeven --- drivers/gpio/gpio-rcar.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c index c49522efa7b3bce4..e67d578ac07c45d5 100644 --- a/drivers/gpio/gpio-rcar.c +++ b/drivers/gpio/gpio-rcar.c @@ -413,7 +413,7 @@ static int gpio_rcar_probe(struct platform_device *pdev) goto err0; } - ret = gpiochip_irqchip_add(&p->gpio_chip, irq_chip, p->config.irq_base, + ret = gpiochip_irqchip_add(gpio_chip, irq_chip, p->config.irq_base, handle_level_irq, IRQ_TYPE_NONE); if (ret) { dev_err(dev, "cannot add irqchip\n"); @@ -431,7 +431,7 @@ static int gpio_rcar_probe(struct platform_device *pdev) /* warn in case of mismatch if irq base is specified */ if (p->config.irq_base) { - ret = irq_find_mapping(p->gpio_chip.irqdomain, 0); + ret = irq_find_mapping(gpio_chip->irqdomain, 0); if (p->config.irq_base != ret) dev_warn(dev, "irq base mismatch (%u/%u)\n", p->config.irq_base, ret); @@ -447,7 +447,7 @@ static int gpio_rcar_probe(struct platform_device *pdev) return 0; err1: - gpiochip_remove(&p->gpio_chip); + gpiochip_remove(gpio_chip); err0: pm_runtime_put(dev); pm_runtime_disable(dev);