diff options
| author | Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> | 2008-09-15 16:02:43 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-09-17 08:58:46 -0400 |
| commit | fbdbf709938d155c719c76b9894d28342632c797 (patch) | |
| tree | 85afb8ced55a88080db009089174ea2fb7c61eeb | |
| parent | 90f7d25c6b672137344f447a30a9159945ffea72 (diff) | |
x86, debug: gpio_free might sleep
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 patch changes the gpio_free implementations for the x86
architecture.
Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
| -rw-r--r-- | include/asm-x86/mach-rdc321x/gpio.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/asm-x86/mach-rdc321x/gpio.h b/include/asm-x86/mach-rdc321x/gpio.h index acce0b7d397b..3639ece6485a 100644 --- a/include/asm-x86/mach-rdc321x/gpio.h +++ b/include/asm-x86/mach-rdc321x/gpio.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _RDC321X_GPIO_H | 1 | #ifndef _RDC321X_GPIO_H |
| 2 | #define _RDC321X_GPIO_H | 2 | #define _RDC321X_GPIO_H |
| 3 | 3 | ||
| 4 | #include <linux/kernel.h> | ||
| 5 | |||
| 4 | extern int rdc_gpio_get_value(unsigned gpio); | 6 | extern int rdc_gpio_get_value(unsigned gpio); |
| 5 | extern void rdc_gpio_set_value(unsigned gpio, int value); | 7 | extern void rdc_gpio_set_value(unsigned gpio, int value); |
| 6 | extern int rdc_gpio_direction_input(unsigned gpio); | 8 | extern int rdc_gpio_direction_input(unsigned gpio); |
| @@ -18,6 +20,7 @@ static inline int gpio_request(unsigned gpio, const char *label) | |||
| 18 | 20 | ||
| 19 | static inline void gpio_free(unsigned gpio) | 21 | static inline void gpio_free(unsigned gpio) |
| 20 | { | 22 | { |
| 23 | might_sleep(); | ||
| 21 | rdc_gpio_free(gpio); | 24 | rdc_gpio_free(gpio); |
| 22 | } | 25 | } |
| 23 | 26 | ||
