]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
karo: fdt: disable all matching touchpanel nodes rather than only the first one
authorLothar Waßmann <LW@KARO-electronics.de>
Thu, 9 Jan 2014 10:52:11 +0000 (11:52 +0100)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 9 Jan 2014 10:52:11 +0000 (11:52 +0100)
board/karo/common/fdt.c

index 5f6fd4888df55e3beca975b97032474ecb520bca..979804d45c055a22236d37411de27a294182143b 100644 (file)
@@ -207,13 +207,11 @@ static void fdt_disable_tp_node(void *blob, const char *name)
 {
        int offs = fdt_node_offset_by_compatible(blob, -1, name);
 
-       if (offs < 0) {
-               debug("node '%s' not found: %s\n", name, fdt_strerror(offs));
-               return;
+       while (offs >= 0) {
+               debug("Disabling node '%s'\n", name);
+               fdt_set_node_status(blob, offs, FDT_STATUS_DISABLED, 0);
+               offs = fdt_node_offset_by_compatible(blob, offs, name);
        }
-
-       debug("Disabling node '%s'\n", name);
-       fdt_set_node_status(blob, offs, FDT_STATUS_DISABLED, 0);
 }
 
 void karo_fdt_fixup_touchpanel(void *blob, const char *panels[],