]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
karo_fdt_fixup_touchpanel: check for env variable 'touchpanel' being set before strin...
authorLothar Waßmann <LW@KARO-electronics.de>
Tue, 28 May 2013 08:15:05 +0000 (10:15 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 28 May 2013 08:15:05 +0000 (10:15 +0200)
board/karo/common/fdt.c

index 20333c854abdf0c32b7578d7b8c0b45e08ec105c..d039c459d2ef45a38b5e868aadc09159885ea874 100644 (file)
@@ -166,10 +166,13 @@ void karo_fdt_fixup_touchpanel(void *blob)
                if (model != NULL && strcmp(model, tp) == 0)
                        continue;
 
-               tp = strchr(tp, ',');
-               if (tp != NULL && *tp != '\0' && strcmp(model, tp + 1) == 0)
-                       continue;
-
+               if (model != NULL) {
+                       if (strcmp(model, tp) == 0)
+                               continue;
+                       tp = strchr(tp, ',');
+                       if (tp != NULL && *tp != '\0' && strcmp(model, tp + 1) == 0)
+                               continue;
+               }
                fdt_del_tp_node(blob, karo_touchpanels[i]);
                karo_set_fdtsize(blob);
        }