[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1221508963-27259-5-git-send-email-ukleinek@informatik.uni-freiburg.de>
Date: Mon, 15 Sep 2008 22:02:43 +0200
From: Uwe Kleine-König
<ukleinek@...ormatik.uni-freiburg.de>
To: linux-kernel@...r.kernel.org
Cc: David Brownell <david-b@...bell.net>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
Guennadi Liakhovetski <g.liakhovetski@...gutronix.de>,
Greg KH <greg@...ah.com>, Kay Sievers <kay.sievers@...y.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Russell King <rmk+kernel@....linux.org.uk>
Subject: [PATCH] gpio_free might sleep, x86 architecture
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@...ormatik.uni-freiburg.de>
Cc: David Brownell <david-b@...bell.net>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@...gutronix.de>
Cc: Greg KH <greg@...ah.com>
Cc: Kay Sievers <kay.sievers@...y.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Russell King <rmk+kernel@....linux.org.uk>
---
include/asm-x86/mach-rdc321x/gpio.h | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/include/asm-x86/mach-rdc321x/gpio.h b/include/asm-x86/mach-rdc321x/gpio.h
index acce0b7..3639ece 100644
--- a/include/asm-x86/mach-rdc321x/gpio.h
+++ b/include/asm-x86/mach-rdc321x/gpio.h
@@ -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);
@@ -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);
}
--
1.5.6.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists