From patchwork Mon Mar 4 02:40:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 2208931 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id AC1883FCF2 for ; Mon, 4 Mar 2013 02:46:04 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UCLKF-0002p0-QM; Mon, 04 Mar 2013 02:40:27 +0000 Received: from mail-pa0-f43.google.com ([209.85.220.43]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UCLK8-0002oP-Vk for linux-arm-kernel@lists.infradead.org; Mon, 04 Mar 2013 02:40:25 +0000 Received: by mail-pa0-f43.google.com with SMTP id bh2so2890932pad.16 for ; Sun, 03 Mar 2013 18:40:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=pzFUmGl6kTeMuOzLD0jV9+l4IKS/qdgKEWnT6KHF0qA=; b=f+wmh5ZiFyStNxw0Qm8N7ULuXJA8mGKOXZ1EmmJ72l8lRrEWgtXOSBKwRBiQKHSHT2 zqidIwdzLJivmrnLs7rZcd/tH0TnUeLv6VUrXoAebVpgG2Qu44okf7WZQfG6/oKzZ4+W RhiWs/ewyNGjvV5Q2hqvMLNa4/FIEIKW08WVADLD/5Z31MVQ586NS7WMjqE6Fg7r5rTr gfrGP/MHZnqv6PchgkyX6HNbQXXH0Lxyy7fBIjVMYhFJko4zwz2rsIze8xaMTjSV25Vs wDqXGdbjl2stpZe89/6XGyoshj05DfbkF+0KHr1wuNUY9ZcFuSlcuxL+Ouu+njTAbrtq JptQ== X-Received: by 10.68.194.226 with SMTP id hz2mr25761332pbc.39.1362364817257; Sun, 03 Mar 2013 18:40:17 -0800 (PST) Received: from localhost.localdomain ([118.143.64.134]) by mx.google.com with ESMTPS id z8sm9457180pbt.39.2013.03.03.18.40.14 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 03 Mar 2013 18:40:16 -0800 (PST) From: Haojian Zhuang To: linus.walleij@linaro.org, linux-arm-kernel@lists.infradead.org, fengguang.wu@intel.com Subject: [PATCH] pinctrl: core: add dependence of GPIOLIB Date: Mon, 4 Mar 2013 10:40:06 +0800 Message-Id: <1362364806-23076-1-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQmYM2pQj1MNqb1dN+89knjPqWufitJMqxMFCCbxPJcH3nD3owgZreeYI930RTMgXxXi8b0N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130303_214021_129782_398E40AD X-CRM114-Status: GOOD ( 10.88 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.220.43 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Haojian Zhuang , patches@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org In file included from drivers/pinctrl/core.c:30:0: include/asm-generic/gpio.h: In function 'gpio_get_value_cansleep': include/asm-generic/gpio.h:270:2: error: implicit declaration of function '__gpio_get_value' [-Werror=implicit-function-declaration] include/asm-generic/gpio.h: In function 'gpio_set_value_cansleep': include/asm-generic/gpio.h:276:2: error: implicit declaration of function '__gpio_set_value' [-Werror=implicit-function-declaration] drivers/pinctrl/core.c: In function 'pinctrl_ready_for_gpio_range': drivers/pinctrl/core.c:297:9: error: implicit declaration of function 'gpio_to_chip' [-Werror=implicit-function-declaration] drivers/pinctrl/core.c:297:27: warning: initialization makes pointer from integer without a cast [enabled by default] drivers/pinctrl/core.c:304:45: error: dereferencing pointer to incomplete type drivers/pinctrl/core.c:305:26: error: dereferencing pointer to incomplete type drivers/pinctrl/core.c:305:39: error: dereferencing pointer to incomplete type cc1: some warnings being treated as errors make[2]: *** [drivers/pinctrl/core.o] Error 1 make[1]: *** [drivers/pinctrl] Error 2 make[1]: *** Waiting for unfinished jobs.... It's caused by CONFIG_GPIOLIB isn't enabled for some platform. So add the dependence on pinctrl_ready_for_gpio_range(). Signed-off-by: Haojian Zhuang --- drivers/pinctrl/core.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index f8a632d..a969947 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -27,7 +27,11 @@ #include #include #include + +#ifdef CONFIG_GPIOLIB #include +#endif + #include "core.h" #include "devicetree.h" #include "pinmux.h" @@ -290,6 +294,7 @@ pinctrl_match_gpio_range(struct pinctrl_dev *pctldev, unsigned gpio) * certain GPIO pin doesn't have back-end pinctrl device. If the return value * is false, it means that pinctrl device may not be ready. */ +#ifdef CONFIG_GPIOLIB static bool pinctrl_ready_for_gpio_range(unsigned gpio) { struct pinctrl_dev *pctldev; @@ -309,6 +314,9 @@ static bool pinctrl_ready_for_gpio_range(unsigned gpio) } return false; } +#else +static bool pinctrl_ready_for_gpio_range(unsigned gpio) { return true; } +#endif /** * pinctrl_get_device_gpio_range() - find device for GPIO range