Blackfin arch: explicit add a might sleep to gpio_free
authorUwe Kleine-Koenig <[email protected]>
Wed, 4 Feb 2009 09:02:30 +0000 (17:02 +0800)
committerBryan Wu <[email protected]>
Wed, 4 Feb 2009 09:02:30 +0000 (17:02 +0800)
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 blackfin
architecture.

Signed-off-by: Uwe Kleine-Koenig <[email protected]>
Cc: David Brownell <[email protected]>
Acked-by: Bryan Wu <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
arch/blackfin/kernel/bfin_gpio.c

index 0c4fc31029c2213feef775977cf9eb33123b38e8..05bf85ba7443158d00d8e75b65f034e9f74c5064 100644 (file)
@@ -1081,6 +1081,8 @@ void bfin_gpio_free(unsigned gpio)
        if (check_gpio(gpio) < 0)
                return;
 
+       might_sleep();
+
        local_irq_save_hw(flags);
 
        if (unlikely(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)))) {