From patchwork Fri Sep 22 09:22:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 113998 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp3058598qgf; Fri, 22 Sep 2017 02:22:58 -0700 (PDT) X-Received: by 10.101.92.196 with SMTP id b4mr5298376pgt.85.1506072178547; Fri, 22 Sep 2017 02:22:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506072178; cv=none; d=google.com; s=arc-20160816; b=hOgUE6dQtwjXi/sOpE0Ps9x6LRjfpuL/Vx3dwuGSQMaVta0FGaakZgaubKx0DVhIGd 0yQ21WJT9eNQGTlrsC70shlz4IwLcn0n6s+rbRX8VgcE8/THkkzy+ziPK7Xh2cIpav/M xh8q3QA2tArL7bIKm6v2sU5pYYQRu6X53pIGSTxqGO346EX2yPR0qmrbp/UKccUWSZt6 yw6BlGyOd3cCRtrWVy6e/TOclhj88J22+Y5zRi1gI+AOR1EZYLa19pTNZMx+KaETtB5S 0VPO2NryBViQtHHUkS0dmUytNyALC0LQmz3aa4UKqdXtDaP9eJmp7L4V3eDQUgXDWMma enQQ== 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=Bo3XihbJTHFIgghvBD5j75UrC3svLiOYGp3fLoKbA+E=; b=djEKugwKN6DALOzqniWtMLAlOmxUEAK7SKPJr0Pwdq3YGFdH7C4WB9ABgKL3uM6sdl Nh75heyxnIDiZeC6OGkiO3znfSFFXFiYNG1cBG41jr5mRhgnYI91FYURqASrELansDGI RJ9zHqsTpNPLaVAZxis+berYOCkhkF8IrT2aKsJj34XWal0HeArvmSwl21Rj0F2e0eKC 65GCeHB7//041bRF+6QJMILs0MQXExj1MBcwRPi8GP+id21EhVHLg4zvLaFQ7zHorIuR +ZLHyKkWtn8RkyZ0RjLysxVukmxbWYKJK4QAqdMJc/jVuaLlAN7uNGcZ0/q/CL28lfjL 4mNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=KDCDTAH+; 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 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 v26si2502469pfg.111.2017.09.22.02.22.58; Fri, 22 Sep 2017 02:22:58 -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=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=KDCDTAH+; 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 sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751847AbdIVJW6 (ORCPT + 5 others); Fri, 22 Sep 2017 05:22:58 -0400 Received: from mail-lf0-f41.google.com ([209.85.215.41]:50028 "EHLO mail-lf0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751809AbdIVJW5 (ORCPT ); Fri, 22 Sep 2017 05:22:57 -0400 Received: by mail-lf0-f41.google.com with SMTP id r17so557221lff.6 for ; Fri, 22 Sep 2017 02:22:56 -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=k2n3uX2elo0ER5Yz4MmCPry7KV4rSiZ2E+MswEd5hlo=; b=KDCDTAH+IhpUOTy+TPEUNLUMfInApGyOLX4eCTJAP1TxHu5dzTKFqD/uesFlFeJEKx Y/2T/AovirbXyvsnrbRrizvQ+G41ZTXIX4ga0EC6DBIHT6ENqxpyGqxWuEnAXPCgAQ3z Vi5K355+DChbt+E5GPssE2ux3N7Y0iYXzlqYQ= 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=k2n3uX2elo0ER5Yz4MmCPry7KV4rSiZ2E+MswEd5hlo=; b=kqd60dRW3q7AKSI77fKU/RB0rNoZmQK+qg2PzlQVjGStIdRMhJwUCn+MPNXd5RemyI OYtWoWIZytNaFAzXRSNOgEeZRwd5u9AMc6NZSVj2VOGnTjX9NYkC0fIk9ovKRhz3gpjZ qFUlQ7Sl9vKHlHnoXz2ATwKgeD/+ACbmJVhJIn/B7b1wzCu2FpbIBTEr0VYbQvvWQwcJ jGO8M4dVEHYcEhtRLZaP42HFT8q61bmZBiBWgyv++/kLFYULb8iUKquZLQQcDVpA77dX 1j5hialk/5UiJny+1YrXGIdNcF076CIm5Fxlou0tX5gbZWz1ScA0KU/8A5nXSIDIoMSn yi7g== X-Gm-Message-State: AHPjjUj7NZUVQkXizKbol1izCYNpsDjZlIz8nfSochPf7RrQ6ndcmWLY rIopOhSo1lx5ALh/jIw2DwbcSbBkgFw= X-Google-Smtp-Source: AOwi7QD9+XO/WXW8p0SixbQZMsmOELWwvqahsAbR6asE7geCfcVkyfaazan9j5X//wqL5oc9s4y84g== X-Received: by 10.25.24.234 with SMTP id 103mr1593917lfy.243.1506072175743; Fri, 22 Sep 2017 02:22:55 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id o193sm542914lfo.11.2017.09.22.02.22.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Sep 2017 02:22:54 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Linus Walleij , Robert Jarzmik Subject: [PATCH 4/4] gpio: pxa: Use library functions Date: Fri, 22 Sep 2017 11:22:43 +0200 Message-Id: <20170922092243.7546-4-linus.walleij@linaro.org> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170922092243.7546-1-linus.walleij@linaro.org> References: <20170922092243.7546-1-linus.walleij@linaro.org> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org These request/free functions are just reimplementations of the standard helpers in gpiolib. Delete them and replace with the helpers. Cc: Robert Jarzmik Signed-off-by: Linus Walleij --- drivers/gpio/gpio-pxa.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) -- 2.13.5 -- 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 Acked-by: Robert Jarzmik diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c index da68d6cbc1e4..f480fb896963 100644 --- a/drivers/gpio/gpio-pxa.c +++ b/drivers/gpio/gpio-pxa.c @@ -330,16 +330,6 @@ static int pxa_gpio_of_xlate(struct gpio_chip *gc, } #endif -static int pxa_gpio_request(struct gpio_chip *chip, unsigned int offset) -{ - return pinctrl_gpio_request(chip->base + offset); -} - -static void pxa_gpio_free(struct gpio_chip *chip, unsigned int offset) -{ - pinctrl_gpio_free(chip->base + offset); -} - static int pxa_init_gpio_chip(struct pxa_gpio_chip *pchip, int ngpio, struct device_node *np, void __iomem *regbase) { @@ -358,8 +348,8 @@ static int pxa_init_gpio_chip(struct pxa_gpio_chip *pchip, int ngpio, pchip->chip.set = pxa_gpio_set; pchip->chip.to_irq = pxa_gpio_to_irq; pchip->chip.ngpio = ngpio; - pchip->chip.request = pxa_gpio_request; - pchip->chip.free = pxa_gpio_free; + pchip->chip.request = gpiochip_generic_request; + pchip->chip.free = gpiochip_generic_free; #ifdef CONFIG_OF_GPIO pchip->chip.of_node = np; pchip->chip.of_xlate = pxa_gpio_of_xlate;