Commit 3d599d1c authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Linus Torvalds

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

This is the generic part which changes gpiolib and the fallback
implementation only.
Signed-off-by: default avatarUwe Kleine-König <>
Cc: David Brownell <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent c557fa3e
......@@ -792,6 +792,8 @@ void gpio_free(unsigned gpio)
unsigned long flags;
struct gpio_desc *desc;
if (!gpio_is_valid(gpio)) {
......@@ -8,6 +8,7 @@
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/errno.h>
......@@ -32,6 +33,8 @@ static inline int gpio_request(unsigned gpio, const char *label)
static inline void gpio_free(unsigned gpio)
/* GPIO can never have been requested */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment