diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-12-09 06:53:39 -0500 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2009-12-10 16:18:33 -0500 |
commit | 1f018c8d0d30bd6cc704104cfc50f2e5eee4e2dd (patch) | |
tree | 84795bbbba73ed57b073958e0000f144a570abc3 /include/asm-generic/gpio.h | |
parent | 4029a91f0c82ae16e5b10b36da51c470895deedf (diff) |
asm-generic/gpio.h: add some forward decls of the device struct
After the recent commit a4177ee7f, attempting to include asm-generic/gpio.h
in otherwise "slim" code results in ugly warnings like so:
CC arch/blackfin/kernel/bfin_gpio.o
In file included from arch/blackfin/include/asm/gpio.h:278,
from arch/blackfin/kernel/bfin_gpio.c:15:
include/asm-generic/gpio.h:193: warning:
‘struct device’ declared inside parameter list
its scope is only this definition or declaration, which is probably not what you want
So add simple C forward decls of the struct device to avoid these.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include/asm-generic/gpio.h')
-rw-r--r-- | include/asm-generic/gpio.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index 66d6106a2067..204bed37e82d 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h | |||
@@ -28,6 +28,7 @@ static inline int gpio_is_valid(int number) | |||
28 | return ((unsigned)number) < ARCH_NR_GPIOS; | 28 | return ((unsigned)number) < ARCH_NR_GPIOS; |
29 | } | 29 | } |
30 | 30 | ||
31 | struct device; | ||
31 | struct seq_file; | 32 | struct seq_file; |
32 | struct module; | 33 | struct module; |
33 | 34 | ||
@@ -181,6 +182,8 @@ static inline void gpio_set_value_cansleep(unsigned gpio, int value) | |||
181 | 182 | ||
182 | #ifndef CONFIG_GPIO_SYSFS | 183 | #ifndef CONFIG_GPIO_SYSFS |
183 | 184 | ||
185 | struct device; | ||
186 | |||
184 | /* sysfs support is only available with gpiolib, where it's optional */ | 187 | /* sysfs support is only available with gpiolib, where it's optional */ |
185 | 188 | ||
186 | static inline int gpio_export(unsigned gpio, bool direction_may_change) | 189 | static inline int gpio_export(unsigned gpio, bool direction_may_change) |