1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-25 15:35:30 +02:00

[brcm47xx] fix compile error (closes #3799)

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11907 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
juhosg 2008-07-22 11:22:41 +00:00
parent d9fc823912
commit 92aeca3157
2 changed files with 9 additions and 7 deletions

View File

@ -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>

View File

@ -121,15 +121,19 @@ 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.