The number of GPIOs defaults to 32 for all ath79 platforms spite the code is checking the number of GPIOs from platform data. Set ngpio to the number of GPIOs obtained previously. Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@xxxxxxxxx> diff --git a/drivers/gpio/gpio-ath79.c b/drivers/gpio/gpio-ath79.c index 5a189b4..0edce15 100644 --- a/drivers/gpio/gpio-ath79.c +++ b/drivers/gpio/gpio-ath79.c @@ -274,6 +274,7 @@ static int ath79_gpio_probe(struct platform_device *pdev) } /* Use base 0 to stay compatible with legacy platforms */ ctrl->gc.base = 0; + ctrl->gc.ngpio = ath79_gpio_count; err = gpiochip_add_data(&ctrl->gc, ctrl); if (err) { -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html