Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114820
b: refs/heads/master
c: 3d599d1
h: refs/heads/master
v: v3
  • Loading branch information
Uwe Kleine-König authored and Linus Torvalds committed Oct 16, 2008
1 parent 3e45177 commit bebc24e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c557fa3e4c156b8713c177d9dde08920130bf551
refs/heads/master: 3d599d1ca57f443e5c4ff5af1e69d90350082f77
2 changes: 2 additions & 0 deletions trunk/drivers/gpio/gpiolib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions trunk/include/linux/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#else

#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/errno.h>

Expand All @@ -32,6 +33,8 @@ static inline int gpio_request(unsigned gpio, const char *label)

static inline void gpio_free(unsigned gpio)
{
might_sleep();

/* GPIO can never have been requested */
WARN_ON(1);
}
Expand Down

0 comments on commit bebc24e

Please sign in to comment.