projects/linux·commit 6ea0205b

gpio: build fixes

6ea0205b · David Brownell <[email protected]> · 2008-05-23 13:04:58 -07:00

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

Signed-off-by: David Brownell <[email protected]>
Cc: Uwe Kleine-König <[email protected]>
Cc: Russell King <[email protected]>
Cc: Arnaud Patard <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
6ea0205b56546cef782b74d9f4664ec00290a6ae
Parents
ee29420a

Changes

2 files changed · +8 −1

FileStatusAddDelContent
include/asm-generic/gpio.hmodified+5−1View file
include/linux/gpio.hmodified+3−0View file

include/asm-generic/gpio.h

View file
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index ecf675a..6be061d 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -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).
@@ -74,7 +78,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

View file
diff --git a/include/linux/gpio.h b/include/linux/gpio.h
index 4987a84..98be6c5 100644
--- a/include/linux/gpio.h
+++ b/include/linux/gpio.h
@@ -8,6 +8,9 @@
#else
+#include <linux/types.h>
+#include <linux/errno.h>
+
/*
* Some platforms don't support the GPIO programming interface.
*