From patchwork Mon Oct 3 09:02:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 77209 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp1548287qgf; Mon, 3 Oct 2016 02:02:53 -0700 (PDT) X-Received: by 10.98.28.69 with SMTP id c66mr9720889pfc.161.1475485373125; Mon, 03 Oct 2016 02:02:53 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id lw6si13588199pab.233.2016.10.03.02.02.53; Mon, 03 Oct 2016 02:02:53 -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; 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 S1751779AbcJCJCw (ORCPT + 4 others); Mon, 3 Oct 2016 05:02:52 -0400 Received: from mail-lf0-f53.google.com ([209.85.215.53]:33590 "EHLO mail-lf0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751583AbcJCJCw (ORCPT ); Mon, 3 Oct 2016 05:02:52 -0400 Received: by mail-lf0-f53.google.com with SMTP id t81so81371695lfe.0 for ; Mon, 03 Oct 2016 02:02:51 -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=WMIvMAfEaxflduCsy2Vu8GDxAR1yMGB/siwsT8eBVNk=; b=e8TfE8cn3OyR+yGHmilX8scYtkJ9bAVaAN7Q2cmC7STHIi1L8W4LT0fOLlf+FsqKa+ TunOP+/EpEvAqKbb/bTv633ojdRHMWYpXYIDAhsCeTZRv57VstQBIW7hTaBYxJNInWA/ wSUI1VcFKlguppUwOM7bi6U/eMrIvvS9grBac= 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=WMIvMAfEaxflduCsy2Vu8GDxAR1yMGB/siwsT8eBVNk=; b=eIuKu57OGOtTFyNEjcNaLln5X1pHIxdH7Cx7uqAVJetOSgk375PQPgYh9y7FuN/a42 fVUQJ2+txk+HAdqM0tLETOOhxw5d+1vrL5oGZ3FbythbNnMtxgjZ3Xz0jjEuOV2DhSnb vZb7R+Su7KnJQy83sKhn2PDItlSkFRZpe+A1O5WSWkaJPkTruymZov6F4fk6GZl8LHDM d24uSBRQ5PHxokaKB+//+tZFlxz2YM+mf08RT43ToM2GgxL3vNdf84itzSXfmSJyZcyg P+4pbSUAJ+PdyT88O+5Ql/TLLPValImGvS2WU5+xjNFoEgi9/mIRfXq20veOiYfKx4pd XRuw== X-Gm-Message-State: AA6/9Rn4p2uq1qJJeu+9TQ5wNjqvi0AKbaKpLzTK+svhsizwf4Lm5n10vSWiTY9E3CkoTgqW X-Received: by 10.25.38.149 with SMTP id m143mr6057915lfm.107.1475485370357; Mon, 03 Oct 2016 02:02:50 -0700 (PDT) Received: from linuslaptop.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id j196sm5482594lfg.9.2016.10.03.02.02.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Oct 2016 02:02:49 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org, Alexandre Courbot Cc: Linus Walleij Subject: [PATCH 3/3] gpio: OF: localize some gpiochip init functions Date: Mon, 3 Oct 2016 11:02:40 +0200 Message-Id: <1475485360-15127-3-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1475485360-15127-1-git-send-email-linus.walleij@linaro.org> References: <1475485360-15127-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 of_gpiochip_add() and of_gpiochip_remove() are only used locally in the gpio subsystem so move these functions to the local header. Signed-off-by: Linus Walleij --- drivers/gpio/gpiolib.h | 4 ++++ include/linux/of_gpio.h | 5 ----- 2 files changed, 4 insertions(+), 5 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/gpiolib.h b/drivers/gpio/gpiolib.h index 9ef9cfee788d..ba1e383079a3 100644 --- a/drivers/gpio/gpiolib.h +++ b/drivers/gpio/gpiolib.h @@ -92,6 +92,8 @@ struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id, unsigned int idx, enum gpio_lookup_flags *flags); +int of_gpiochip_add(struct gpio_chip *gc); +void of_gpiochip_remove(struct gpio_chip *gc); #else static inline struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id, @@ -100,6 +102,8 @@ static inline struct gpio_desc *of_find_gpio(struct device *dev, { return ERR_PTR(-ENOENT); } +static inline int of_gpiochip_add(struct gpio_chip *gc) { return 0; } +static inline void of_gpiochip_remove(struct gpio_chip *gc) { } #endif /* CONFIG_OF_GPIO */ #ifdef CONFIG_ACPI diff --git a/include/linux/of_gpio.h b/include/linux/of_gpio.h index 092186c62ff4..3f87ea5b8bee 100644 --- a/include/linux/of_gpio.h +++ b/include/linux/of_gpio.h @@ -61,8 +61,6 @@ static inline int of_mm_gpiochip_add(struct device_node *np, } extern void of_mm_gpiochip_remove(struct of_mm_gpio_chip *mm_gc); -extern int of_gpiochip_add(struct gpio_chip *gc); -extern void of_gpiochip_remove(struct gpio_chip *gc); extern int of_gpio_simple_xlate(struct gpio_chip *gc, const struct of_phandle_args *gpiospec, u32 *flags); @@ -86,9 +84,6 @@ static inline int of_gpio_simple_xlate(struct gpio_chip *gc, return -ENOSYS; } -static inline int of_gpiochip_add(struct gpio_chip *gc) { return 0; } -static inline void of_gpiochip_remove(struct gpio_chip *gc) { } - #endif /* CONFIG_OF_GPIO */ /**