From 2d2ad6f7042e9f6c3f7574958016b3cc8aa77d28 Mon Sep 17 00:00:00 2001 From: mb Date: Sun, 20 Jul 2008 19:34:09 +0000 Subject: Update gpiommc to use configfs git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11887 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../patches-2.6.25/920-backport-gpio-is-valid.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 target/linux/generic-2.6/patches-2.6.25/920-backport-gpio-is-valid.patch (limited to 'target/linux/generic-2.6/patches-2.6.25/920-backport-gpio-is-valid.patch') diff --git a/target/linux/generic-2.6/patches-2.6.25/920-backport-gpio-is-valid.patch b/target/linux/generic-2.6/patches-2.6.25/920-backport-gpio-is-valid.patch new file mode 100644 index 000000000..966270b78 --- /dev/null +++ b/target/linux/generic-2.6/patches-2.6.25/920-backport-gpio-is-valid.patch @@ -0,0 +1,18 @@ +Backport gpio_is_valid() for gpiolib from linux-2.6.26 +Index: linux-2.6.25.10/include/asm-generic/gpio.h +=================================================================== +--- linux-2.6.25.10.orig/include/asm-generic/gpio.h 2008-07-03 05:46:47.000000000 +0200 ++++ linux-2.6.25.10/include/asm-generic/gpio.h 2008-07-20 20:32:12.000000000 +0200 +@@ -16,6 +16,12 @@ + #define ARCH_NR_GPIOS 256 + #endif + ++static inline int gpio_is_valid(int number) ++{ ++ /* only some non-negative numbers are valid */ ++ return ((unsigned)number) < ARCH_NR_GPIOS; ++} ++ + struct seq_file; + + /** -- cgit v1.2.3