瀏覽代碼

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 <ukleinek@strlen.de>
Cc: David Brownell <david-b@pacbell.net>
Acked-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Uwe Kleine-Koenig 16 年之前
父節點
當前提交
45c4f2a0b6
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      arch/blackfin/kernel/bfin_gpio.c

+ 2 - 0
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)))) {