[PATCH] GPIO: #include <linux/kernel.h> for might_sleep

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: David Brownell <dbrownell@...>
Cc: <linux-kernel@...>
Date: Friday, April 11, 2008 - 4:24 am

Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
---
Hello David,

I like having headers being independend of the order of inclusion.
Usually I order all includes alphabetically (and grouped by linux/,
asm/, etc.).  This doesn't work with gpio.h because then kernel.h is
included to late.

Best regards
Uwe

 include/asm-generic/gpio.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index f29a502..4fe6207 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -97,6 +97,8 @@ extern int __gpio_cansleep(unsigned gpio);
 
 #else
 
+#include <linux/kernel.h>
+
 /* platforms that don't directly support access to GPIOs through I2C, SPI,
  * or other blocking infrastructure can use these wrappers.
  */
-- 
1.5.4.5

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] GPIO: #include <linux/kernel.h> for might_sleep, Uwe Kleine-König, (Fri Apr 11, 4:24 am)