Skip to contentSkip to conversation

gpio: ath79: set ngpio from platform data

PATCH New Daniel Gonzalez Cabanelas 1 participant 1 message Feb 17, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 gpio: ath79: set ngpio from platform data

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.

drivers/gpio/gpio-ath79.c +1 -0
index 5a189b4..0edce15 100644
@@ -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) {