linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] gpio: ath79: set ngpio from platform data
@ 2017-02-17 15:07 Daniel Gonzalez Cabanelas
  0 siblings, 0 replies; only message in thread
From: Daniel Gonzalez Cabanelas @ 2017-02-17 15:07 UTC (permalink / raw)
  To: linux-gpio

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@gmail.com>
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) {


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-02-17 15:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-17 15:07 [PATCH 2/2] gpio: ath79: set ngpio from platform data Daniel Gonzalez Cabanelas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).