Commit 8a8ab2e6 authored by Peter Korsgaard's avatar Peter Korsgaard Committed by Kukjin Kim
Browse files

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: default avatarPeter Korsgaard <>
Signed-off-by: default avatarKukjin Kim <>
parent ce19de02
...@@ -914,6 +914,10 @@ static void __init s3c24xx_gpiolib_add_chips(struct samsung_gpio_chip *chip, ...@@ -914,6 +914,10 @@ static void __init s3c24xx_gpiolib_add_chips(struct samsung_gpio_chip *chip,
struct gpio_chip *gc = &chip->chip; struct gpio_chip *gc = &chip->chip;
for (i = 0 ; i < nr_chips; i++, chip++) { for (i = 0 ; i < nr_chips; i++, chip++) {
/* skip banks not present on SoC */
if (chip->chip.base >= S3C_GPIO_END)
if (!chip->config) if (!chip->config)
chip->config = &s3c24xx_gpiocfg_default; chip->config = &s3c24xx_gpiocfg_default;
if (!chip->pm) if (!chip->pm)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment