From patchwork Fri Nov 25 10:09:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 84094 Delivered-To: patch@linaro.org Received: by 10.182.1.168 with SMTP id 8csp51635obn; Fri, 25 Nov 2016 02:09:49 -0800 (PST) X-Received: by 10.99.185.88 with SMTP id v24mr12481379pgo.179.1480068589255; Fri, 25 Nov 2016 02:09:49 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e6si15360056plj.245.2016.11.25.02.09.49; Fri, 25 Nov 2016 02:09:49 -0800 (PST) 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=neutral (body hash did not verify) header.i=@linaro.org; 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=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751932AbcKYKJs (ORCPT + 4 others); Fri, 25 Nov 2016 05:09:48 -0500 Received: from mail-lf0-f49.google.com ([209.85.215.49]:33773 "EHLO mail-lf0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750801AbcKYKJq (ORCPT ); Fri, 25 Nov 2016 05:09:46 -0500 Received: by mail-lf0-f49.google.com with SMTP id c13so46806676lfg.0 for ; Fri, 25 Nov 2016 02:09:45 -0800 (PST) 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=CXi61ua8oXFWu/9EKfNj1kZrj+Fp2Ks1AakGrJsmLV4=; b=dP35z+O7SPXEpXWLRXeJZKUMN/xNP9bAHN45rW8ixLvyr/1vrPoOn65l+YP8TpGy9v 6mRdTttws5vxkjOK2YQhbQMVdVuLd3FM/2YQ+URQR8SwtS3AXBm8NGphu4Buzklb+5iN NasF3Y6bBRNvvOihuY5hTf675WJVn/GtLk2AY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CXi61ua8oXFWu/9EKfNj1kZrj+Fp2Ks1AakGrJsmLV4=; b=hFuCjMZEHOmWclEq9nCY45ic0hEcG4ENgo/GuV+3Xz5LysBIps3UX122WWuXf/4Q6X 3TL3RYP71XKxJKIPkk8FqeOokzULd8jvB3rwUpRuyIFcLoLfU+KM10qa6b/CuApl1xBX /nLg+symWbvpr11swpTBCUNPaJluzYmNfSWsGU0dYRNi+Q9a2AYC5uF++cLPMN6v/CRV KTC20vT6y/GqxVpiaJ6a6v0Pnn0koFJqkDIvcSJPLYpfrHwtKn+i+OVzfq+M97LBfkwC xWmm5pWOuXK68w+sMBeIPSsYO+9FUP7GSSvcaELttLf1cUgSsLqv+EePu7Ums2rYxHi9 z0wg== X-Gm-Message-State: AKaTC000klH0hrLTNb8r/BPqS4Jm8m96Uln6IFYMbrj89KNWMjSJrfdFlTE+jyLY3R1UwNf3 X-Received: by 10.25.196.72 with SMTP id u69mr2489348lff.32.1480068584578; Fri, 25 Nov 2016 02:09:44 -0800 (PST) Received: from linuslaptop.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id c78sm5088022lfc.39.2016.11.25.02.09.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Nov 2016 02:09:44 -0800 (PST) From: Linus Walleij To: linux-gpio@vger.kernel.org, Alexandre Courbot , linux-arm-kernel@lists.infradead.org, Baruch Siach Cc: Sudeep Holla , Haojian Zhuang , Linus Walleij Subject: [PATCH 2/5] gpio: pl061: rename state container struct Date: Fri, 25 Nov 2016 11:09:21 +0100 Message-Id: <1480068564-9447-2-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1480068564-9447-1-git-send-email-linus.walleij@linaro.org> References: <1480068564-9447-1-git-send-email-linus.walleij@linaro.org> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The PL061 state container is named "pl061_gpio", let's rename it to simply pl061. Less is more. Signed-off-by: Linus Walleij --- drivers/gpio/gpio-pl061.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/gpio/gpio-pl061.c b/drivers/gpio/gpio-pl061.c index 8838a44351ce..b944aaefb59f 100644 --- a/drivers/gpio/gpio-pl061.c +++ b/drivers/gpio/gpio-pl061.c @@ -50,7 +50,7 @@ struct pl061_context_save_regs { }; #endif -struct pl061_gpio { +struct pl061 { spinlock_t lock; void __iomem *base; @@ -64,14 +64,14 @@ struct pl061_gpio { static int pl061_get_direction(struct gpio_chip *gc, unsigned offset) { - struct pl061_gpio *chip = gpiochip_get_data(gc); + struct pl061 *chip = gpiochip_get_data(gc); return !(readb(chip->base + GPIODIR) & BIT(offset)); } static int pl061_direction_input(struct gpio_chip *gc, unsigned offset) { - struct pl061_gpio *chip = gpiochip_get_data(gc); + struct pl061 *chip = gpiochip_get_data(gc); unsigned long flags; unsigned char gpiodir; @@ -87,7 +87,7 @@ static int pl061_direction_input(struct gpio_chip *gc, unsigned offset) static int pl061_direction_output(struct gpio_chip *gc, unsigned offset, int value) { - struct pl061_gpio *chip = gpiochip_get_data(gc); + struct pl061 *chip = gpiochip_get_data(gc); unsigned long flags; unsigned char gpiodir; @@ -109,14 +109,14 @@ static int pl061_direction_output(struct gpio_chip *gc, unsigned offset, static int pl061_get_value(struct gpio_chip *gc, unsigned offset) { - struct pl061_gpio *chip = gpiochip_get_data(gc); + struct pl061 *chip = gpiochip_get_data(gc); return !!readb(chip->base + (BIT(offset + 2))); } static void pl061_set_value(struct gpio_chip *gc, unsigned offset, int value) { - struct pl061_gpio *chip = gpiochip_get_data(gc); + struct pl061 *chip = gpiochip_get_data(gc); writeb(!!value << offset, chip->base + (BIT(offset + 2))); } @@ -124,7 +124,7 @@ static void pl061_set_value(struct gpio_chip *gc, unsigned offset, int value) static int pl061_irq_type(struct irq_data *d, unsigned trigger) { struct gpio_chip *gc = irq_data_get_irq_chip_data(d); - struct pl061_gpio *chip = gpiochip_get_data(gc); + struct pl061 *chip = gpiochip_get_data(gc); int offset = irqd_to_hwirq(d); unsigned long flags; u8 gpiois, gpioibe, gpioiev; @@ -214,7 +214,7 @@ static void pl061_irq_handler(struct irq_desc *desc) unsigned long pending; int offset; struct gpio_chip *gc = irq_desc_get_handler_data(desc); - struct pl061_gpio *chip = gpiochip_get_data(gc); + struct pl061 *chip = gpiochip_get_data(gc); struct irq_chip *irqchip = irq_desc_get_chip(desc); chained_irq_enter(irqchip, desc); @@ -232,7 +232,7 @@ static void pl061_irq_handler(struct irq_desc *desc) static void pl061_irq_mask(struct irq_data *d) { struct gpio_chip *gc = irq_data_get_irq_chip_data(d); - struct pl061_gpio *chip = gpiochip_get_data(gc); + struct pl061 *chip = gpiochip_get_data(gc); u8 mask = BIT(irqd_to_hwirq(d) % PL061_GPIO_NR); u8 gpioie; @@ -245,7 +245,7 @@ static void pl061_irq_mask(struct irq_data *d) static void pl061_irq_unmask(struct irq_data *d) { struct gpio_chip *gc = irq_data_get_irq_chip_data(d); - struct pl061_gpio *chip = gpiochip_get_data(gc); + struct pl061 *chip = gpiochip_get_data(gc); u8 mask = BIT(irqd_to_hwirq(d) % PL061_GPIO_NR); u8 gpioie; @@ -266,7 +266,7 @@ static void pl061_irq_unmask(struct irq_data *d) static void pl061_irq_ack(struct irq_data *d) { struct gpio_chip *gc = irq_data_get_irq_chip_data(d); - struct pl061_gpio *chip = gpiochip_get_data(gc); + struct pl061 *chip = gpiochip_get_data(gc); u8 mask = BIT(irqd_to_hwirq(d) % PL061_GPIO_NR); spin_lock(&chip->lock); @@ -277,7 +277,7 @@ static void pl061_irq_ack(struct irq_data *d) static int pl061_irq_set_wake(struct irq_data *d, unsigned int state) { struct gpio_chip *gc = irq_data_get_irq_chip_data(d); - struct pl061_gpio *chip = gpiochip_get_data(gc); + struct pl061 *chip = gpiochip_get_data(gc); return irq_set_irq_wake(chip->parent_irq, state); } @@ -295,7 +295,7 @@ static int pl061_probe(struct amba_device *adev, const struct amba_id *id) { struct device *dev = &adev->dev; struct pl061_platform_data *pdata = dev_get_platdata(dev); - struct pl061_gpio *chip; + struct pl061 *chip; int ret, irq, i, irq_base; chip = devm_kzalloc(dev, sizeof(*chip), GFP_KERNEL); @@ -379,7 +379,7 @@ static int pl061_probe(struct amba_device *adev, const struct amba_id *id) #ifdef CONFIG_PM static int pl061_suspend(struct device *dev) { - struct pl061_gpio *chip = dev_get_drvdata(dev); + struct pl061 *chip = dev_get_drvdata(dev); int offset; chip->csave_regs.gpio_data = 0; @@ -400,7 +400,7 @@ static int pl061_suspend(struct device *dev) static int pl061_resume(struct device *dev) { - struct pl061_gpio *chip = dev_get_drvdata(dev); + struct pl061 *chip = dev_get_drvdata(dev); int offset; for (offset = 0; offset < PL061_GPIO_NR; offset++) {