From 5418e76a1934d5105dc797d46aa21dd4c3c17254 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Mon, 5 Sep 2011 00:17:25 +0200 Subject: [PATCH 1/2] s3c24xx_gpiolib_init: only register available gpio banks Only register gpio banks provided by SoC instead of the maximum possible to lessen confusion, get rid of a warning from gpiolib and stop it from eating into the extra gpios for configs with S3C24XX_GPIO_EXTRA != 0. Signed-off-by: Peter Korsgaard --- arch/arm/plat-s3c24xx/gpiolib.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/arm/plat-s3c24xx/gpiolib.c b/arch/arm/plat-s3c24xx/gpiolib.c index 243b641..6360ae7 100644 --- a/arch/arm/plat-s3c24xx/gpiolib.c +++ b/arch/arm/plat-s3c24xx/gpiolib.c @@ -217,6 +217,9 @@ static __init int s3c24xx_gpiolib_init(void) int gpn; for (gpn = 0; gpn < ARRAY_SIZE(s3c24xx_gpios); gpn++, chip++) { + if (chip->chip.base >= S3C_GPIO_END) + break; + if (!chip->config) chip->config = &s3c24xx_gpiocfg_default; -- 1.7.5.4