From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: linux-kernel@vger.kernel.org
Cc: Yuanhan Liu <yuanhan.liu@linux.intel.com>,
Grant Likely <grant.likely@secretlab.ca>,
Linus Walleij <linus.walleij@linaro.org>,
Fengguang Wu <fengguang.wu@intel.com>
Subject: [PATCH 2/2] gpio: do not call __gpio_xxx under !CONFIG_GPIOLIB
Date: Wed, 31 Oct 2012 15:00:55 +0800 [thread overview]
Message-ID: <1351666855-23854-2-git-send-email-yuanhan.liu@linux.intel.com> (raw)
In-Reply-To: <1351666855-23854-1-git-send-email-yuanhan.liu@linux.intel.com>
Those functions are availabe only when CONFIG_GPIOLIB is set. So, we
should not call them under !CONFIG_GPIOLIB block.
This would fix following build errros:
include/asm-generic/gpio.h: In function 'gpio_get_value_cansleep':
include/asm-generic/gpio.h:220:2: error: implicit declaration of function '__gpio_get_value'
include/asm-generic/gpio.h: In function 'gpio_set_value_cansleep':
nclude/asm-generic/gpio.h:226:2: error: implicit declaration of function '__gpio_set_value'
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
include/asm-generic/gpio.h | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index a73272d..704bf5d 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -257,14 +257,13 @@ static inline int gpio_cansleep(unsigned gpio)
static inline int gpio_get_value_cansleep(unsigned gpio)
{
- might_sleep();
- return __gpio_get_value(gpio);
+ WARN_ON(1);
+ return 0;
}
static inline void gpio_set_value_cansleep(unsigned gpio, int value)
{
- might_sleep();
- __gpio_set_value(gpio, value);
+ WARN_ON(1);
}
#endif /* !CONFIG_GPIOLIB */
--
1.7.7.6
next prev parent reply other threads:[~2012-10-31 7:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-31 7:00 [PATCH 1/2] gpio: move those interface depends on GPIOLIB into proper section Yuanhan Liu
2012-10-31 7:00 ` Yuanhan Liu [this message]
2012-11-04 17:47 ` [PATCH 2/2] gpio: do not call __gpio_xxx under !CONFIG_GPIOLIB Linus Walleij
2012-11-06 5:27 ` Yuanhan Liu
2012-10-31 7:12 ` [PATCH 1/2] gpio: move those interface depends on GPIOLIB into proper section Fengguang Wu
2012-10-31 7:19 ` Yuanhan Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1351666855-23854-2-git-send-email-yuanhan.liu@linux.intel.com \
--to=yuanhan.liu@linux.intel.com \
--cc=fengguang.wu@intel.com \
--cc=grant.likely@secretlab.ca \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome