diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2008-07-22 11:22:41 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2008-07-22 11:22:41 +0000 |
commit | e6baf82abd46a0869a1ea77b9334345b402e615c (patch) | |
tree | 9306b2b482008ad5f61692fb5b62f22061f8b742 | |
parent | 5d5385684def58aabb1e2138747a56c4c6a581af (diff) | |
download | upstream-e6baf82abd46a0869a1ea77b9334345b402e615c.tar.gz upstream-e6baf82abd46a0869a1ea77b9334345b402e615c.tar.bz2 upstream-e6baf82abd46a0869a1ea77b9334345b402e615c.zip |
fix compile error (closes #3799)
SVN-Revision: 11907
-rw-r--r-- | target/linux/brcm47xx/patches-2.6.25/710-add-gpio-is-valid.patch | 8 | ||||
-rw-r--r-- | target/linux/generic-2.6/patches-2.6.25/961-backport_gpio_define_gpio_valid.patch | 8 |
2 files changed, 9 insertions, 7 deletions
diff --git a/target/linux/brcm47xx/patches-2.6.25/710-add-gpio-is-valid.patch b/target/linux/brcm47xx/patches-2.6.25/710-add-gpio-is-valid.patch index bca3b4eaae..4cb7642e88 100644 --- a/target/linux/brcm47xx/patches-2.6.25/710-add-gpio-is-valid.patch +++ b/target/linux/brcm47xx/patches-2.6.25/710-add-gpio-is-valid.patch @@ -31,14 +31,12 @@ Index: linux-2.6.25.10/include/asm-mips/mach-bcm47xx/gpio.h static inline int gpio_request(unsigned gpio, const char *label) { -@@ -52,6 +53,10 @@ static inline int gpio_direction_output( +@@ -52,6 +53,8 @@ static inline int gpio_direction_output( return bcm47xx_gpio_direction_output(gpio, value); } -+static inline int gpio_is_valid(int gpio) -+{ -+ return bcm47xx_gpio_is_valid(gpio); -+} ++#define gpio_is_valid bcm47xx_gpio_is_valid ++ /* cansleep wrappers */ #include <asm-generic/gpio.h> diff --git a/target/linux/generic-2.6/patches-2.6.25/961-backport_gpio_define_gpio_valid.patch b/target/linux/generic-2.6/patches-2.6.25/961-backport_gpio_define_gpio_valid.patch index 2e826d43f4..58e65efa7f 100644 --- a/target/linux/generic-2.6/patches-2.6.25/961-backport_gpio_define_gpio_valid.patch +++ b/target/linux/generic-2.6/patches-2.6.25/961-backport_gpio_define_gpio_valid.patch @@ -121,16 +121,20 @@ index 7e77b6f..464c5b3 100644 struct seq_file; struct module; -@@ -99,6 +105,12 @@ extern int __gpio_cansleep(unsigned gpio); +@@ -99,6 +105,16 @@ extern int __gpio_cansleep(unsigned gpio); #else -+static inline int gpio_is_valid(int number) ++static inline int __gpio_is_valid(int number) +{ + /* only non-negative numbers are valid */ + return number >= 0; +} + ++#ifndef gpio_is_valid ++#define gpio_is_valid __gpio_is_valid ++#endif ++ /* platforms that don't directly support access to GPIOs through I2C, SPI, * or other blocking infrastructure can use these wrappers. */ |