mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
gpio_free might sleep, generic part
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 is the generic part which changes gpiolib and the fallback implementation only. Signed-off-by: Uwe Kleine-König <[email protected]> Cc: David Brownell <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
c557fa3e4c
commit
3d599d1ca5
2 changed files with 5 additions and 0 deletions
|
|
@ -792,6 +792,8 @@ void gpio_free(unsigned gpio)
|
|||
unsigned long flags;
|
||||
struct gpio_desc *desc;
|
||||
|
||||
might_sleep();
|
||||
|
||||
if (!gpio_is_valid(gpio)) {
|
||||
WARN_ON(extra_checks);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue