diff options
author | Michael Büsch <mb@bu3sch.de> | 2008-07-20 19:34:09 +0000 |
---|---|---|
committer | Michael Büsch <mb@bu3sch.de> | 2008-07-20 19:34:09 +0000 |
commit | 204728376c1d9bc86939269ac79209a1a2cb8fc6 (patch) | |
tree | ce7ad1f51bb9fb12d86ebd98a34be1cb88333d1c /target/linux/generic-2.6/patches-2.6.25/920-backport-gpio-is-valid.patch | |
parent | d7bdc375604b6466af7978a9ecc526af62e77524 (diff) | |
download | master-31e0f0ae-204728376c1d9bc86939269ac79209a1a2cb8fc6.tar.gz master-31e0f0ae-204728376c1d9bc86939269ac79209a1a2cb8fc6.tar.bz2 master-31e0f0ae-204728376c1d9bc86939269ac79209a1a2cb8fc6.zip |
Update gpiommc to use configfs
SVN-Revision: 11887
Diffstat (limited to 'target/linux/generic-2.6/patches-2.6.25/920-backport-gpio-is-valid.patch')
-rw-r--r-- | target/linux/generic-2.6/patches-2.6.25/920-backport-gpio-is-valid.patch | 18 |
1 files changed, 18 insertions, 0 deletions
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 0000000000..966270b78e --- /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; + + /** |