Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 45c4f2a0 authored by Uwe Kleine-Koenig's avatar Uwe Kleine-Koenig Committed by Bryan Wu
Browse files

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: default avatarUwe Kleine-Koenig <ukleinek@strlen.de>
Cc: David Brownell <david-b@pacbell.net>
Acked-by: default avatarBryan Wu <cooloney@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 2f95d5bd
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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)))) {