aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--target/linux/ifxmips/files/include/asm-mips/mach-ifxmips/gpio.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/target/linux/ifxmips/files/include/asm-mips/mach-ifxmips/gpio.h b/target/linux/ifxmips/files/include/asm-mips/mach-ifxmips/gpio.h
index 76d42c2e3b..0dece372d1 100644
--- a/target/linux/ifxmips/files/include/asm-mips/mach-ifxmips/gpio.h
+++ b/target/linux/ifxmips/files/include/asm-mips/mach-ifxmips/gpio.h
@@ -86,5 +86,9 @@ static inline void gpio_set_value_cansleep(unsigned gpio, int value) {
gpio_set_value(gpio, value);
}
-#endif
+static inline int gpio_is_valid(int number)
+{
+ return ((unsigned)number) < 8;
+}
+#endif