From: Rafał Miłecki Date: Thu, 13 Feb 2014 16:48:12 +0000 (+0100) Subject: MIPS: BCM47XX: Check all (32) GPIOs when looking for a pin X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4fe2169acecb6e62821dfe14bc5c5852870b516f;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git MIPS: BCM47XX: Check all (32) GPIOs when looking for a pin Broadcom boards support 32 GPIOs and NVRAM may have entires for higher ones too. Example: gpio23=wombo_reset Signed-off-by: Rafa? Mi?ecki Acked-by: Hauke Mehrtens Cc: linux-mips@linux-mips.org Cc: Rafał Miłecki Patchwork: https://patchwork.linux-mips.org/patch/6547/ Signed-off-by: Ralf Baechle --- diff --git a/arch/mips/bcm47xx/nvram.c b/arch/mips/bcm47xx/nvram.c index 6decb27cf48b..2bed73a684ae 100644 --- a/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c @@ -196,7 +196,7 @@ int bcm47xx_nvram_gpio_pin(const char *name) 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;