aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/linux/linux-openmoko-2.6.30.4/130-fix-s3c_gpiolib_getchip.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/linux/linux-openmoko-2.6.30.4/130-fix-s3c_gpiolib_getchip.patch')
-rw-r--r--recipes/linux/linux-openmoko-2.6.30.4/130-fix-s3c_gpiolib_getchip.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/recipes/linux/linux-openmoko-2.6.30.4/130-fix-s3c_gpiolib_getchip.patch b/recipes/linux/linux-openmoko-2.6.30.4/130-fix-s3c_gpiolib_getchip.patch
new file mode 100644
index 0000000000..96730014ed
--- /dev/null
+++ b/recipes/linux/linux-openmoko-2.6.30.4/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 */