Skip to content

Commit

Permalink
x86, debug: gpio_free might sleep
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 x86
architecture.

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Uwe Kleine-König authored and Ingo Molnar committed Sep 17, 2008
1 parent 90f7d25 commit fbdbf70
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/asm-x86/mach-rdc321x/gpio.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef _RDC321X_GPIO_H
#define _RDC321X_GPIO_H

#include <linux/kernel.h>

extern int rdc_gpio_get_value(unsigned gpio);
extern void rdc_gpio_set_value(unsigned gpio, int value);
extern int rdc_gpio_direction_input(unsigned gpio);
Expand All @@ -18,6 +20,7 @@ static inline int gpio_request(unsigned gpio, const char *label)

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

Expand Down

0 comments on commit fbdbf70

Please sign in to comment.