From patchwork Wed Aug 22 20:41:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 144853 Delivered-To: patch@linaro.org Received: by 2002:a2e:164a:0:0:0:0:0 with SMTP id 10-v6csp401499ljw; Wed, 22 Aug 2018 13:41:27 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzbN6KGabVaGNTDK/pX3Ty9nc6m50kUb88t0xO1iSBZ5JNNbxpZFhD0dWjkDyajAc0Duavw X-Received: by 2002:a63:af17:: with SMTP id w23-v6mr18771752pge.47.1534970486955; Wed, 22 Aug 2018 13:41:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534970486; cv=none; d=google.com; s=arc-20160816; b=lYPKMlGc8Qn7dlSZd4/NzhbfExUwrhTxuOrZlqbZTYnJC5cdCBFfTOrsvIeGjaKGj9 nvAyVkZ80K5D6I7OVc4x0ySTLXRiT5a7wYJKpcSbZWM5KIDITsJIrcBHNQfgujCCijst AlatzbMm1IHN0TGLu4llU3HQN67VA3+44rdnPMYtCflQp1UwceuLqM0z5AEip56sz0M4 xohHmBMJkSAkHCLULW9Ad6embfXU8anvTi20Rv/PXFfOG5YTWlg+SFMcqceLCfHf9H0r KzOEmd++Gg2NeaO9/IN3LcPdSc02GzCq6tL40jUk/rB1uEgHK4l06JiegInPOYkywbtr /P9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=uh0WbNXotrGv/LOuuP8ez/+FvQdmMcnLT3xmPJQ17Cs=; b=LSfB6lRGoKI5nkdHBHayiNJDA39PHznRJlAex+v3K8hWpHB/ae9yvC17Faouy3da9d PMPA+lYeZR0uHynGB5MuorOEjZNESRJUIWZ+E5P6phlW7lE/WGUA5MFSneq5jN7cSzWc 3TpmLcr1FAeynD8V80+R83iWefhbwXZPl6kp8TM0xMG1QVr9I29OlZAOUGqm1kZgYybE JVzUJV+ZvzKSFNKE6YtHrzHZQleYjV4E7fqDjapnq2LtHt+pkxi2byKcxSF2qHRmUpGp ZXbQsT6tdyhNf3zo3iDGsfcsIOtS0I9Oy/h935rCKnQL0Cz0T6337ZXGCm4KInBCDHYt BSRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bCsRGdoN; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t23-v6si2559068pgi.301.2018.08.22.13.41.26; Wed, 22 Aug 2018 13:41:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bCsRGdoN; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727285AbeHWAHt (ORCPT + 5 others); Wed, 22 Aug 2018 20:07:49 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:43702 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727331AbeHWAHt (ORCPT ); Wed, 22 Aug 2018 20:07:49 -0400 Received: by mail-lj1-f193.google.com with SMTP id m84-v6so2429773lje.10 for ; Wed, 22 Aug 2018 13:41:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=uh0WbNXotrGv/LOuuP8ez/+FvQdmMcnLT3xmPJQ17Cs=; b=bCsRGdoNmAZHbv2xavWhPkrDaToTMw99ukokLw2irfs8XKw+eKmM7l8BEauVyT0Lx7 ugYUhJct5IgrERSmvMQDWiCwjDekhJinkgfke7XEUiNdNRVoFMJi8Fvbc9Uf1Th35SfC W1Vzu8vjDS1Wzrqsrw8hSobAvPDOkAs8G5xUg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=uh0WbNXotrGv/LOuuP8ez/+FvQdmMcnLT3xmPJQ17Cs=; b=ll2iuxmqNfgGdPGarksG/C9vShHLGLo7khWkhnEoyJLSzLTLJ/D27xMBLEPYNKxApW TllerivHnH2xdwPs5z+aKyQbHWiAdcPhgJfzE69U8jshtCK9+bdP/3HG9IGYfUlje9XP fHoQP7qnjQljzFvr1iI3M81GJbm+58QkRnlerF9NCvN/8uEfPdYCH9VDeUX9ziImeTXu uvLaoO18LfNAjtNy/Zr/tBgVw8SG6gLVrfc07tWUpEp9Z+g92OnR8qeX2sKYtVxCwAqz F0XgzY8DPy4d54xBPvBEwRPEXBqqkEBZskEI/cNJyRTgUG/3WK76/yUADA2tChgoCt55 /axQ== X-Gm-Message-State: AOUpUlGxrR6hHiNuY4jqWBP6bAk3a9JpVaR9O5Qxnjl6/7a5sq1iHt1C 1dDNF2QA6+DMvp29ViQL17Nphx8Z1nYVCA== X-Received: by 2002:a2e:534e:: with SMTP id t14-v6mr30103840ljd.26.1534970484301; Wed, 22 Aug 2018 13:41:24 -0700 (PDT) Received: from localhost.bredbandsbolaget (c-ae7b71d5.014-348-6c756e10.bbcust.telenor.se. [213.113.123.174]) by smtp.gmail.com with ESMTPSA id q128-v6sm431515ljq.72.2018.08.22.13.41.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 Aug 2018 13:41:23 -0700 (PDT) From: Linus Walleij To: H Hartley Sweeten , Alexander Sverdlin Cc: linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, Linus Walleij Subject: [PATCH 02/11] gpio: ep93xx: Cut down variable names Date: Wed, 22 Aug 2018 22:41:02 +0200 Message-Id: <20180822204111.9581-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180822204111.9581-1-linus.walleij@linaro.org> References: <20180822204111.9581-1-linus.walleij@linaro.org> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org In order to clean up the driver I need to cut a few trees, sorry, variable names, so I can see the forest, sorry driver properly. Signed-off-by: Linus Walleij --- drivers/gpio/gpio-ep93xx.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) -- 2.17.1 Tested-by: Alexander Sverdlin diff --git a/drivers/gpio/gpio-ep93xx.c b/drivers/gpio/gpio-ep93xx.c index 654525d6a9f1..3bfd0e46f7ed 100644 --- a/drivers/gpio/gpio-ep93xx.c +++ b/drivers/gpio/gpio-ep93xx.c @@ -37,7 +37,7 @@ void __iomem *ep93xx_gpio_base; /* FIXME: put this into irq_data */ #define EP93XX_GPIO_LINE_MAX_IRQ 23 struct ep93xx_gpio { - void __iomem *mmio_base; + void __iomem *base; struct gpio_chip gc[8]; }; @@ -323,10 +323,10 @@ static int ep93xx_gpio_to_irq(struct gpio_chip *chip, unsigned offset) } static int ep93xx_gpio_add_bank(struct gpio_chip *gc, struct device *dev, - void __iomem *mmio_base, struct ep93xx_gpio_bank *bank) + void __iomem *base, struct ep93xx_gpio_bank *bank) { - void __iomem *data = mmio_base + bank->data; - void __iomem *dir = mmio_base + bank->dir; + void __iomem *data = base + bank->data; + void __iomem *dir = base + bank->dir; int err; err = bgpio_init(gc, dev, 1, data, NULL, NULL, dir, NULL, 0); @@ -346,27 +346,27 @@ static int ep93xx_gpio_add_bank(struct gpio_chip *gc, struct device *dev, static int ep93xx_gpio_probe(struct platform_device *pdev) { - struct ep93xx_gpio *ep93xx_gpio; + struct ep93xx_gpio *epg; struct resource *res; int i; struct device *dev = &pdev->dev; - ep93xx_gpio = devm_kzalloc(dev, sizeof(struct ep93xx_gpio), GFP_KERNEL); - if (!ep93xx_gpio) + epg = devm_kzalloc(dev, sizeof(*epg), GFP_KERNEL); + if (!epg) return -ENOMEM; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ep93xx_gpio->mmio_base = devm_ioremap_resource(dev, res); - if (IS_ERR(ep93xx_gpio->mmio_base)) - return PTR_ERR(ep93xx_gpio->mmio_base); - ep93xx_gpio_base = ep93xx_gpio->mmio_base; + epg->base = devm_ioremap_resource(dev, res); + if (IS_ERR(epg->base)) + return PTR_ERR(epg->base); + ep93xx_gpio_base = epg->base; for (i = 0; i < ARRAY_SIZE(ep93xx_gpio_banks); i++) { - struct gpio_chip *gc = &ep93xx_gpio->gc[i]; + struct gpio_chip *gc = &epg->gc[i]; struct ep93xx_gpio_bank *bank = &ep93xx_gpio_banks[i]; if (ep93xx_gpio_add_bank(gc, &pdev->dev, - ep93xx_gpio->mmio_base, bank)) + epg->base, bank)) dev_warn(&pdev->dev, "Unable to add gpio bank %s\n", bank->label); }