Skip to content

Commit

Permalink
gpio/samsung: only register available gpio banks
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Kukjin Kim <[email protected]>
  • Loading branch information
jacmet authored and kgene committed Oct 12, 2011
1 parent ce19de0 commit 8a8ab2e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/gpio/gpio-samsung.c
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,10 @@ static void __init s3c24xx_gpiolib_add_chips(struct samsung_gpio_chip *chip,
struct gpio_chip *gc = &chip->chip;

for (i = 0 ; i < nr_chips; i++, chip++) {
/* skip banks not present on SoC */
if (chip->chip.base >= S3C_GPIO_END)
continue;

if (!chip->config)
chip->config = &s3c24xx_gpiocfg_default;
if (!chip->pm)
Expand Down

0 comments on commit 8a8ab2e

Please sign in to comment.