X-Git-Url: https://git.archive.openwrt.org/?p=openwrt.git;a=blobdiff_plain;f=target%2Flinux%2Fbrcm63xx%2Fpatches-4.4%2F378-MIPS-BCM63XX-do-not-register-gpio-controller-if-pres.patch;fp=target%2Flinux%2Fbrcm63xx%2Fpatches-4.4%2F378-MIPS-BCM63XX-do-not-register-gpio-controller-if-pres.patch;h=af6eaff075a254c4f4c5387351bfff88aa0c88d7;hp=2faf0dea29d7e32d4f42486e50ad2cb586adac17;hb=d0f4c2868f6b7500565484d2568d48d8383330b0;hpb=5d4b94475e508272c11f0649db43af66bceda360 diff --git a/target/linux/brcm63xx/patches-4.4/378-MIPS-BCM63XX-do-not-register-gpio-controller-if-pres.patch b/target/linux/brcm63xx/patches-4.4/378-MIPS-BCM63XX-do-not-register-gpio-controller-if-pres.patch index 2faf0dea29..af6eaff075 100644 --- a/target/linux/brcm63xx/patches-4.4/378-MIPS-BCM63XX-do-not-register-gpio-controller-if-pres.patch +++ b/target/linux/brcm63xx/patches-4.4/378-MIPS-BCM63XX-do-not-register-gpio-controller-if-pres.patch @@ -17,13 +17,13 @@ Signed-off-by: Jonas Gorski +#include "boards/board_common.h" + - /* for registering lookups; make them large enough to hold OF names */ - static char *gpio_chip_labels[] = { - "xxxxxxxx.gpio-controller", -@@ -50,8 +52,9 @@ static void __init bcm63xx_gpio_init_one + static const char * const gpio_chip_labels[] = { + "bcm63xx-gpio.0", + "bcm63xx-gpio.1", +@@ -48,8 +50,9 @@ static void __init bcm63xx_gpio_init_one + pdata.base = id * 32; pdata.ngpio = ngpio; - sprintf(gpio_chip_labels[id], "bcm63xx-gpio.%d", id); - platform_device_register_resndata(NULL, "bcm63xx-gpio", id, res, 2, - &pdata, sizeof(pdata)); + if (!board_of_device_present("gpio0"))