summaryrefslogtreecommitdiffstats
path: root/target/linux/s3c24xx
diff options
context:
space:
mode:
authorlars <lars@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-07-21 02:06:06 +0000
committerlars <lars@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-07-21 02:06:06 +0000
commit8935da19721ad4211ffbd00c0a93eeeea5de5d6f (patch)
tree97bddc2376607041d70eff1782cd818ffe34c1e1 /target/linux/s3c24xx
parent3bbf9530b1a31f7d8b4d3e9b536af28098cf9ce7 (diff)
[s3c24xx] fix s3c_gpiolib_getchip. The comparison was the wrong way, causing all
kinds of funny things :/ git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16937 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/s3c24xx')
-rw-r--r--target/linux/s3c24xx/patches-2.6.30/130-fix-s3c_gpiolib_getchip.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/target/linux/s3c24xx/patches-2.6.30/130-fix-s3c_gpiolib_getchip.patch b/target/linux/s3c24xx/patches-2.6.30/130-fix-s3c_gpiolib_getchip.patch
new file mode 100644
index 000000000..96730014e
--- /dev/null
+++ b/target/linux/s3c24xx/patches-2.6.30/130-fix-s3c_gpiolib_getchip.patch
@@ -0,0 +1,13 @@
+diff --git a/arch/arm/mach-s3c2410/include/mach/gpio-core.h b/arch/arm/mach-s3c2410/include/mach/gpio-core.h
+index 8fe1920..f8b879a 100644
+--- a/arch/arm/mach-s3c2410/include/mach/gpio-core.h
++++ b/arch/arm/mach-s3c2410/include/mach/gpio-core.h
+@@ -28,7 +28,7 @@ static inline struct s3c_gpio_chip *s3c_gpiolib_getchip(unsigned int pin)
+ return NULL;
+
+ chip = &s3c24xx_gpios[pin/32];
+- return (S3C2410_GPIO_OFFSET(pin) > chip->chip.ngpio) ? chip : NULL;
++ return (S3C2410_GPIO_OFFSET(pin) < chip->chip.ngpio) ? chip : NULL;
+ }
+
+ #endif /* __ASM_ARCH_GPIO_CORE_H */