Skip to content

Commit

Permalink
Blackfin arch: explicit add a might sleep to gpio_free
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Uwe Kleine-Koenig authored and Bryan Wu committed Feb 4, 2009
1 parent 2f95d5b commit 45c4f2a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/blackfin/kernel/bfin_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)))) {
Expand Down

0 comments on commit 45c4f2a

Please sign in to comment.