From 45c4f2a0b6c6302c5617534b8189c0e9b5a4a048 Mon Sep 17 00:00:00 2001 From: Uwe Kleine-Koenig Date: Wed, 4 Feb 2009 17:02:30 +0800 Subject: [PATCH] Blackfin arch: explicit add a might sleep to gpio_free 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 Cc: David Brownell Acked-by: Bryan Wu Signed-off-by: Andrew Morton --- arch/blackfin/kernel/bfin_gpio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c index 0c4fc31..05bf85b 100644 --- a/arch/blackfin/kernel/bfin_gpio.c +++ b/arch/blackfin/kernel/bfin_gpio.c @@ -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)))) { -- 2.7.4