From patchwork Wed Mar 27 23:34:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 15711 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 2CC8623DEE for ; Wed, 27 Mar 2013 23:34:34 +0000 (UTC) Received: from mail-ve0-f174.google.com (mail-ve0-f174.google.com [209.85.128.174]) by fiordland.canonical.com (Postfix) with ESMTP id B1035A19DB7 for ; Wed, 27 Mar 2013 23:34:33 +0000 (UTC) Received: by mail-ve0-f174.google.com with SMTP id jz10so4774499veb.33 for ; Wed, 27 Mar 2013 16:34:33 -0700 (PDT) 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=K4wLrO6iaJbEKiUwD3Y6kD8dD0fY9hfBgyXFbF/sptUbiQRaP/8zZENkFWYpmT3BsV PMl1yLTY/ivOwtfU1BuMreFs9sdhrN5VN1SohPZLD55JtBfzcH1TltptUKuz9OVS04xx ZBoZS+mOj2gJ4Pm9oPD0TISOXxqZSkSGpIQq1/t6U3oD7Svo1WzKugxj4ORjeHkODau1 vQ12Y5T8VQLsFUuaYhgwI8CAVwm6RAsxDjXYfnlrc4etlFq/AVqnBu8vjsQkDYLIVzob WvFOl0XP000WIpzU7c4x3CY1VE9KGhxFsqoU08/QPNbueJJHkxioe4lp5qIi2wUE/88k 74VQ== X-Received: by 10.220.153.143 with SMTP id k15mr25463192vcw.33.1364427273209; Wed, 27 Mar 2013 16:34:33 -0700 (PDT) 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.59.4.204 with SMTP id cg12csp137895ved; Wed, 27 Mar 2013 16:34:32 -0700 (PDT) X-Received: by 10.66.72.3 with SMTP id z3mr30065340pau.125.1364427272106; Wed, 27 Mar 2013 16:34:32 -0700 (PDT) Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com [209.85.220.42]) by mx.google.com with ESMTPS id ox10si23873015pbb.271.2013.03.27.16.34.31 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 27 Mar 2013 16:34:32 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.42 is neither permitted nor denied by best guess record for domain of haojian.zhuang@linaro.org) client-ip=209.85.220.42; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.42 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-f42.google.com with SMTP id kq13so1748618pab.1 for ; Wed, 27 Mar 2013 16:34:31 -0700 (PDT) X-Received: by 10.68.227.129 with SMTP id sa1mr31948922pbc.107.1364427271593; Wed, 27 Mar 2013 16:34:31 -0700 (PDT) Received: from localhost.localdomain ([27.115.121.36]) by mx.google.com with ESMTPS id f4sm23076022pbc.6.2013.03.27.16.34.28 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 27 Mar 2013 16:34:30 -0700 (PDT) From: Haojian Zhuang To: linus.walleij@linaro.org, fengguang.wu@intel.com, linux-kernel@vger.kernel.org Cc: patches@linaro.org, Haojian Zhuang Subject: [PATCH resend] pinctrl: core: add dependence of GPIOLIB Date: Thu, 28 Mar 2013 07:34:19 +0800 Message-Id: <1364427259-25658-1-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQlu6+fQstZZf6Vnzp2PLe+W0ktW+3Xzrv5h4RK7FRRqkUBFE0XKUZ33rG+IQjG8xC7QpPgJ 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