diff options
author | Peter Korsgaard <jacmet@sunsite.dk> | 2011-10-10 06:55:58 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2011-10-12 07:52:47 -0400 |
commit | 8a8ab2e64e09b56dc1324fd2f7da12346166cad1 (patch) | |
tree | 6821d51036c57062ce279c73541afd03f83883a9 /drivers/gpio/gpio-samsung.c | |
parent | ce19de02937772286e5d1f065d3143ec3abce200 (diff) |
gpio/samsung: 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 <jacmet@sunsite.dk>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'drivers/gpio/gpio-samsung.c')
-rw-r--r-- | drivers/gpio/gpio-samsung.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c index b6be77ae4973..c87b65af8c96 100644 --- a/drivers/gpio/gpio-samsung.c +++ b/drivers/gpio/gpio-samsung.c | |||
@@ -914,6 +914,10 @@ static void __init s3c24xx_gpiolib_add_chips(struct samsung_gpio_chip *chip, | |||
914 | struct gpio_chip *gc = &chip->chip; | 914 | struct gpio_chip *gc = &chip->chip; |
915 | 915 | ||
916 | for (i = 0 ; i < nr_chips; i++, chip++) { | 916 | for (i = 0 ; i < nr_chips; i++, chip++) { |
917 | /* skip banks not present on SoC */ | ||
918 | if (chip->chip.base >= S3C_GPIO_END) | ||
919 | continue; | ||
920 | |||
917 | if (!chip->config) | 921 | if (!chip->config) |
918 | chip->config = &s3c24xx_gpiocfg_default; | 922 | chip->config = &s3c24xx_gpiocfg_default; |
919 | if (!chip->pm) | 923 | if (!chip->pm) |