diff options
author | Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> | 2008-10-16 09:03:12 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-16 22:21:40 +0400 |
commit | 3d599d1ca57f443e5c4ff5af1e69d90350082f77 (patch) | |
tree | 475b066c18f2b610d6a0ee0a6313237ce61afc4a /include/linux/gpio.h | |
parent | c557fa3e4c156b8713c177d9dde08920130bf551 (diff) | |
download | linux-3d599d1ca57f443e5c4ff5af1e69d90350082f77.tar.xz |
gpio_free might sleep, generic part
According to the documentation gpio_free should only be called from task
context only. To make this more explicit add a might sleep to all
implementations.
This is the generic part which changes gpiolib and the fallback
implementation only.
Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/gpio.h')
-rw-r--r-- | include/linux/gpio.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/gpio.h b/include/linux/gpio.h index 730a20b83576..e10c49a5b96e 100644 --- a/include/linux/gpio.h +++ b/include/linux/gpio.h @@ -8,6 +8,7 @@ #else +#include <linux/kernel.h> #include <linux/types.h> #include <linux/errno.h> @@ -32,6 +33,8 @@ static inline int gpio_request(unsigned gpio, const char *label) static inline void gpio_free(unsigned gpio) { + might_sleep(); + /* GPIO can never have been requested */ WARN_ON(1); } |