Subject: MIPS: BCM47XX: Check all (32) GPIOs when looking for a pin

From: Rafał Miłecki <[email-masked]>
Date: Thu, 13 Feb 2014 17:48:12 +0100

Broadcom boards support 32 GPIOs and NVRAM may have entires for higher
ones too. Example:
gpio23=wombo_reset

Signed-off-by: Rafa? Mi?ecki <[email-masked]>
Acked-by: Hauke Mehrtens <[email-masked]>
Cc: [email-masked]
Cc: Rafał Miłecki <[email-masked]>
Patchwork: https://patchwork.linux-mips.org/patch/6547/
Signed-off-by: Ralf Baechle <[email-masked]>

--- a/arch/mips/bcm47xx/nvram.c
+++ b/arch/mips/bcm47xx/nvram.c
@@ -197,7 +197,7 @@ int bcm47xx_nvram_gpio_pin(const char *n
 	char nvram_var[10];
 	char buf[30];
 
-	for (i = 0; i < 16; i++) {
+	for (i = 0; i < 32; i++) {
 		err = snprintf(nvram_var, sizeof(nvram_var), "gpio%i", i);
 		if (err <= 0)
 			continue;