aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-orion5x
diff options
context:
space:
mode:
authorUwe Kleine-König <ukleinek@informatik.uni-freiburg.de>2008-10-29 17:14:54 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-10-30 10:41:50 -0400
commit9c6568501cbf731a910db2fcb7d094977dcb154c (patch)
treedda2ce4a1a7cd65134328fe4f199bff810ab4ba6 /arch/arm/mach-orion5x
parent63890a0ee1af994122094bd01f87ea6251631a3f (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-orion5x')
-rw-r--r--arch/arm/mach-orion5x/gpio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/mach-orion5x/gpio.c b/arch/arm/mach-orion5x/gpio.c
index fc419868e39..f99d08811e5 100644
--- a/arch/arm/mach-orion5x/gpio.c
+++ b/arch/arm/mach-orion5x/gpio.c
@@ -165,6 +165,8 @@ EXPORT_SYMBOL(gpio_request);
165 165
166void gpio_free(unsigned pin) 166void gpio_free(unsigned pin)
167{ 167{
168 might_sleep();
169
168 if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid)) { 170 if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid)) {
169 pr_debug("%s: invalid GPIO %d\n", __func__, pin); 171 pr_debug("%s: invalid GPIO %d\n", __func__, pin);
170 return; 172 return;