From patchwork Fri Sep 22 09:22:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 113997 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp3058568qgf; Fri, 22 Sep 2017 02:22:56 -0700 (PDT) X-Received: by 10.101.66.205 with SMTP id l13mr8616135pgp.278.1506072176597; Fri, 22 Sep 2017 02:22:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506072176; cv=none; d=google.com; s=arc-20160816; b=ZNqwnxKzn5XpmNv0ImMtGk7J5KYykV0++LlUCpfo7DU05AzAjTVwdMUw7cwQzElb3h pQpiZNj46kFh7zrLQsGKBHWLuU489bMixrQdAhqNXd+UIBW4QxhJHeRECLdnovwrn3Bw KQ1PKF0MII4fTyFHzWWE769NHQLfUaJHPDOFCF6oFGsLIGYFJO9Ma7CkcN3uz7N+2XTr yVtpQ6QlPVti7zkbVEIneHVhTG4iQwj2lPJFk7liK4MYSHOTyski7+xbAszzvHJMKylV ZkfMgx8lMFAytdTrlj8qGMMZuOcf9ZNgngcESuiOfhVVNvF+ASERNtnoQ4Rx8S/XVJki pdwA== 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=/0pYYQ5BoclLlt4txQ9FzV1zA4GunBdaVg0qCGC7gDo=; b=QnK0r2GAmrEYhvyJ7VvB9fnRyvPn2FiH5vmX4kFvpBzeMv4XtgIPfx1FirXKd3LD13 OSEV/JmwQjLb437rFPPyDmAIJpI4T2XHfhOebUZvcudQlXhm4wLqnjpVIu/3BPsrCjvb R26heFgNkKdW0S2u661gJyBhDztGulSqwxuT8GNf+qQ455EKDHoN5WLhETtwDf5I+G4o 2WeWRyiVSpCZ1lzauMLjUc41Rhxd9ylPsiL13gigaK4VcSiTOg1R8/QV4doNYRuJp5B4 hRcPrSNlTJXbN1CJQwFwx54nPMSY1z7dH0S1pwaDgEMk4vEue2rPAvC8uTwFn0oSAZZQ Kycg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=XN1SgFss; 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.56; Fri, 22 Sep 2017 02:22:56 -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=XN1SgFss; 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 S1751838AbdIVJW4 (ORCPT + 5 others); Fri, 22 Sep 2017 05:22:56 -0400 Received: from mail-lf0-f53.google.com ([209.85.215.53]:43763 "EHLO mail-lf0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751809AbdIVJWz (ORCPT ); Fri, 22 Sep 2017 05:22:55 -0400 Received: by mail-lf0-f53.google.com with SMTP id c80so559803lfh.0 for ; Fri, 22 Sep 2017 02:22:54 -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=lVSK//XE5PavDyjHG1jBXac4V6TjU51hWpW+Io5ue2M=; b=XN1SgFssAz9ytEqBsSnHrOmQaCJzVr2yMh679e5XCFpRdA4l6912CU4CGQ+gzURvnl uOj0O/URoHeXBX8pRq/TOlnONCrJiZ5zc62Ait+He0o5hkZDZRG5/kBWBQS0lG0tygXl OepFq7OnBRA7zsgayBK4sLzWf9FOwmg/hBnXI= 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=lVSK//XE5PavDyjHG1jBXac4V6TjU51hWpW+Io5ue2M=; b=N5jADsrwmQwESI9qfA0n5UNtIPN9t3xo8dahDe4x31mVuIlofdCkHnamrKfDHZjM99 oZ2jTy+Murv8KQEUi5wxcH/UZWrghXZNuofok9t0Bdrxeur5rr61gIiw5qpEAI/v6WfP 4NEQEBCZDzVaXqwUjCAkLt7vI66p3xirKdsXsC5/kEHRoavu7kskz9pKcBC1xTuHz3B4 iF/ARXqlBPG55gevpLgaiLGH1NCyfF5uBYLGdSRbEVYrKQrIxdGA+lbJvY73yv0VWAZE qwu/0F99fJRz2oGppyiCqBzm4MBzB2DHzgAFDdP+O7PberEq5Gdcb+7P7BOy36+xGJH6 KBlw== X-Gm-Message-State: AHPjjUhymClU4LrcqP91897/L1RSEhMrrCkxUn6srs9qxypmmli0yuot /HdmrAyIH4T0D3hSf6Y/1Rhz5RxWiU4= X-Google-Smtp-Source: AOwi7QDa802tl/ajEARS8e+gDR/iH7vocl7PoQ2JvxNuo5GSRoVWqOtCkdGDzvek+tx35iThrdk2SA== X-Received: by 10.25.195.71 with SMTP id t68mr1839342lff.40.1506072173776; Fri, 22 Sep 2017 02:22:53 -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.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Sep 2017 02:22:52 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Linus Walleij , Neil Armstrong Subject: [PATCH 3/4] pinctrl: meson: Use library functions Date: Fri, 22 Sep 2017 11:22:42 +0200 Message-Id: <20170922092243.7546-3-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: Neil Armstrong Signed-off-by: Linus Walleij --- drivers/pinctrl/meson/pinctrl-meson.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 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 diff --git a/drivers/pinctrl/meson/pinctrl-meson.c b/drivers/pinctrl/meson/pinctrl-meson.c index e6e12a7b21e0..da2c41e23f10 100644 --- a/drivers/pinctrl/meson/pinctrl-meson.c +++ b/drivers/pinctrl/meson/pinctrl-meson.c @@ -410,18 +410,6 @@ static const struct pinconf_ops meson_pinconf_ops = { .is_generic = true, }; -static int meson_gpio_request(struct gpio_chip *chip, unsigned gpio) -{ - return pinctrl_gpio_request(chip->base + gpio); -} - -static void meson_gpio_free(struct gpio_chip *chip, unsigned gpio) -{ - struct meson_pinctrl *pc = gpiochip_get_data(chip); - - pinctrl_gpio_free(pc->data->pin_base + gpio); -} - static int meson_gpio_direction_input(struct gpio_chip *chip, unsigned gpio) { struct meson_pinctrl *pc = gpiochip_get_data(chip); @@ -539,8 +527,8 @@ static int meson_gpiolib_register(struct meson_pinctrl *pc) pc->chip.label = pc->data->name; pc->chip.parent = pc->dev; - pc->chip.request = meson_gpio_request; - pc->chip.free = meson_gpio_free; + pc->chip.request = gpiochip_generic_request; + pc->chip.free = gpiochip_generic_free; pc->chip.direction_input = meson_gpio_direction_input; pc->chip.direction_output = meson_gpio_direction_output; pc->chip.get = meson_gpio_get;