Skip to contentSkip to conversation

gpio: build fixes (mostly potential)

PATCH New David Brownell 1 participant 1 message May 21, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: build fixes (mostly potential)

This fixes various gpio-related build errors (mostly potential) reported in part by Russell King and Uwe Kleine-König.

---
Refreshed version -- should apply OK on top of the gpio sysfs support

 include/asm-generic/gpio.h |    6 +++++-
 include/linux/gpio.h       |    3 +++
 2 files changed, 8 insertions(+), 1 deletion(-)
include/asm-generic/gpio.h +5 -1
@@ -1,8 +1,12 @@
 #ifndef _ASM_GENERIC_GPIO_H
 #define _ASM_GENERIC_GPIO_H
 
+#include <linux/types.h>
+
 #ifdef CONFIG_HAVE_GPIO_LIB
 
+#include <linux/compiler.h>
+
 /* Platforms may implement their GPIO interface with library code,
  * at a small performance cost for non-inlined operations and some
  * extra memory (for code and for per-GPIO table entries).
@@ -78,7 +82,7 @@ struct gpio_chip {
 
 extern const char *gpiochip_is_requested(struct gpio_chip *chip,
 			unsigned offset);
-extern int __init __must_check gpiochip_reserve(int start, int ngpio);
+extern int __must_check gpiochip_reserve(int start, int ngpio);
 
 /* add/remove chips */
 extern int gpiochip_add(struct gpio_chip *chip);
include/linux/gpio.h +3 -0
@@ -8,6 +8,9 @@
 
 #else
 
+#include <linux/types.h>
+#include <linux/errno.h>
+
 /*
  * Some platforms don't support the GPIO programming interface.
  *