diff options
author | Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> | 2008-10-29 17:14:54 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-10-30 10:41:50 -0400 |
commit | 9c6568501cbf731a910db2fcb7d094977dcb154c (patch) | |
tree | dda2ce4a1a7cd65134328fe4f199bff810ab4ba6 /arch/arm/mach-at91/include/mach/gpio.h | |
parent | 63890a0ee1af994122094bd01f87ea6251631a3f (diff) |
[ARM] gpio_free might sleep, arm architecture
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 arm architecture.
DaVinci is skipped on purpose to simplify the merge process for patches
switching it over to use gpiolib as per request by David Brownell.
Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Cc: David Brownell <david-b@pacbell.net>
Cc: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-at91/include/mach/gpio.h')
-rw-r--r-- | arch/arm/mach-at91/include/mach/gpio.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/include/mach/gpio.h b/arch/arm/mach-at91/include/mach/gpio.h index 76d76e2fa69e..bffa6741a751 100644 --- a/arch/arm/mach-at91/include/mach/gpio.h +++ b/arch/arm/mach-at91/include/mach/gpio.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #ifndef __ASM_ARCH_AT91RM9200_GPIO_H | 13 | #ifndef __ASM_ARCH_AT91RM9200_GPIO_H |
14 | #define __ASM_ARCH_AT91RM9200_GPIO_H | 14 | #define __ASM_ARCH_AT91RM9200_GPIO_H |
15 | 15 | ||
16 | #include <linux/kernel.h> | ||
16 | #include <asm/irq.h> | 17 | #include <asm/irq.h> |
17 | 18 | ||
18 | #define PIN_BASE NR_AIC_IRQS | 19 | #define PIN_BASE NR_AIC_IRQS |
@@ -220,6 +221,7 @@ static inline int gpio_request(unsigned gpio, const char *label) | |||
220 | 221 | ||
221 | static inline void gpio_free(unsigned gpio) | 222 | static inline void gpio_free(unsigned gpio) |
222 | { | 223 | { |
224 | might_sleep(); | ||
223 | } | 225 | } |
224 | 226 | ||
225 | extern int gpio_direction_input(unsigned gpio); | 227 | extern int gpio_direction_input(unsigned gpio); |