summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2410/include/mach/gpio-track.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-s3c2410/include/mach/gpio-track.h')
-rw-r--r--arch/arm/mach-s3c2410/include/mach/gpio-track.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-s3c2410/include/mach/gpio-track.h b/arch/arm/mach-s3c2410/include/mach/gpio-track.h
index acb259103808..d67819dde42a 100644
--- a/arch/arm/mach-s3c2410/include/mach/gpio-track.h
+++ b/arch/arm/mach-s3c2410/include/mach/gpio-track.h
@@ -23,11 +23,11 @@ static inline struct s3c_gpio_chip *s3c_gpiolib_getchip(unsigned int pin)
{
struct s3c_gpio_chip *chip;
- if (pin > S3C2410_GPG(10))
+ if (pin > S3C_GPIO_END)
return NULL;
chip = &s3c24xx_gpios[pin/32];
- return (S3C2410_GPIO_OFFSET(pin) < chip->chip.ngpio) ? chip : NULL;
+ return ((pin - chip->chip.base) < chip->chip.ngpio) ? chip : NULL;
}
#endif /* __ASM_ARCH_GPIO_CORE_H */
OpenPOWER on IntegriCloud