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: 15211 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 95FDE23DEA for ; Mon, 4 Mar 2013 02:40:19 +0000 (UTC) Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by fiordland.canonical.com (Postfix) with ESMTP id 3964CA18AF0 for ; Mon, 4 Mar 2013 02:40:19 +0000 (UTC) Received: by mail-ve0-f179.google.com with SMTP id da11so4220138veb.24 for ; Sun, 03 Mar 2013 18:40:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=pzFUmGl6kTeMuOzLD0jV9+l4IKS/qdgKEWnT6KHF0qA=; b=In5ZX2yqLiNqJ741n78PkypWeoKrI5vwPyQNG9065gL9KNy33xQnHvc6e0BRndRA8g SZVnv2UFnvi1XYqvxkWRWyE4ao8A5Qpwvpp6uvrOpuTgAMnJ+JwzkFpofcGWzyb52tuB uZGUQzOwu4OTn4X0KMODnqbmC0zRb5mHR59DBYeD9M96AfprDH/tLKSM9Ibc1OzXWcjV JHkXCCPnfYYAPmp7GreJTXHzLUt1iU1xx7/qCb6IKYGX9ridXYJAovk5x7SRNvzgTB6P Aiv626l4YUh6BA+z/9SW43flaDGDdpyxzOcRlGl9ZkFABGntmCF3TLPDy09MKRGOaOTs fs6Q== X-Received: by 10.220.149.82 with SMTP id s18mr7081883vcv.14.1362364818701; Sun, 03 Mar 2013 18:40:18 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp35713veb; Sun, 3 Mar 2013 18:40:18 -0800 (PST) X-Received: by 10.66.51.225 with SMTP id n1mr30025071pao.203.1362364817730; Sun, 03 Mar 2013 18:40:17 -0800 (PST) Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) by mx.google.com with ESMTPS id o9si8574938paw.311.2013.03.03.18.40.17 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 03 Mar 2013 18:40:17 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.46 is neither permitted nor denied by best guess record for domain of haojian.zhuang@linaro.org) client-ip=209.85.220.46; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.46 is neither permitted nor denied by best guess record for domain of haojian.zhuang@linaro.org) smtp.mail=haojian.zhuang@linaro.org Received: by mail-pa0-f46.google.com with SMTP id kp14so2850307pab.5 for ; Sun, 03 Mar 2013 18:40:17 -0800 (PST) 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 Cc: patches@linaro.org, Haojian Zhuang 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: ALoCoQme2RtR+GlsRxfSNCUGz9EYW0nubcQNIF7P2fTdpfbKJ+HqPIqFFWuEQgxdOiJojmjr+/Nx 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