]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
strip '<drivername>:' when parsing video_mode; parse resulution as decimal numbers
authorLothar Waßmann <LW@KARO-electronics.de>
Mon, 24 Jun 2013 09:35:31 +0000 (11:35 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Mon, 24 Jun 2013 09:35:31 +0000 (11:35 +0200)
board/karo/tx48/tx48.c

index 5ed220bf287e3aa9c70ec984cd35534f7b2e14be..5435f79e2c33e38808c2b96fbba12e48888f95fc 100644 (file)
@@ -468,7 +468,7 @@ void lcd_panel_disable(void)
 void lcd_ctrl_init(void *lcdbase)
 {
        int color_depth = 24;
-       char *vm;
+       char *vm, *v;
        unsigned long val;
        struct da8xx_panel *p = &tx48_lcd_panel;
        int refresh = 60;
@@ -489,9 +489,12 @@ void lcd_ctrl_init(void *lcdbase)
                return;
        }
 
+       if ((v = strstr(vm, ":")))
+               vm = v + 1;
+
        strncpy((char *)p->name, vm, sizeof(p->name));
 
-       val = simple_strtoul(vm, &vm, 0);
+       val = simple_strtoul(vm, &vm, 10);
        if (val != 0) {
                if (val > panel_info.vl_col)
                        val = panel_info.vl_col;
@@ -499,7 +502,7 @@ void lcd_ctrl_init(void *lcdbase)
                panel_info.vl_col = val;
        }
        if (*vm == 'x') {
-               val = simple_strtoul(vm + 1, &vm, 0);
+               val = simple_strtoul(vm + 1, &vm, 10);
                if (val > panel_info.vl_row)
                        val = panel_info.vl_row;
                p->height = val;