96730014edae4a6ffa93f4f332a7394b754a3d51
[openwrt/svn-archive/archive.git] / target / linux / s3c24xx / patches-2.6.30 / 130-fix-s3c_gpiolib_getchip.patch
1 diff --git a/arch/arm/mach-s3c2410/include/mach/gpio-core.h b/arch/arm/mach-s3c2410/include/mach/gpio-core.h
2 index 8fe1920..f8b879a 100644
3 --- a/arch/arm/mach-s3c2410/include/mach/gpio-core.h
4 +++ b/arch/arm/mach-s3c2410/include/mach/gpio-core.h
5 @@ -28,7 +28,7 @@ static inline struct s3c_gpio_chip *s3c_gpiolib_getchip(unsigned int pin)
6 return NULL;
7
8 chip = &s3c24xx_gpios[pin/32];
9 - return (S3C2410_GPIO_OFFSET(pin) > chip->chip.ngpio) ? chip : NULL;
10 + return (S3C2410_GPIO_OFFSET(pin) < chip->chip.ngpio) ? chip : NULL;
11 }
12
13 #endif /* __ASM_ARCH_GPIO_CORE_H */