Skip to content

Commit

Permalink
asm-generic/gpio.h: add some forward decls of the device struct
Browse files Browse the repository at this point in the history
After the recent commit a4177ee, 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>
  • Loading branch information
Mike Frysinger authored and Arnd Bergmann committed Dec 10, 2009
1 parent 4029a91 commit 1f018c8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/asm-generic/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ static inline int gpio_is_valid(int number)
return ((unsigned)number) < ARCH_NR_GPIOS;
}

struct device;
struct seq_file;
struct module;

Expand Down Expand Up @@ -181,6 +182,8 @@ static inline void gpio_set_value_cansleep(unsigned gpio, int value)

#ifndef CONFIG_GPIO_SYSFS

struct device;

/* sysfs support is only available with gpiolib, where it's optional */

static inline int gpio_export(unsigned gpio, bool direction_may_change)
Expand Down

0 comments on commit 1f018c8

Please sign in to comment.