staging:panel: Fix cursor positioning escapes
PATCH 3/3 staging:panel: Fix cursor positioning escapes
Patch for fixing bug in cursor position escape handling. The bug was introduced when simple_strtoul was converted to kstrtoul without taking into account that the end pointer is used to continue the parsing. Reverted the code back to simple_strtoul.
This patch depends on patch 2 and should therefore be applied after it.
Signed-off-by Zoltan Kelemen <[email protected]>
----
drivers/staging/panel/panel.c +6 -4
@@ -1228,14 +1228,16 @@break ;while (*esc) { +char *endp; +if (*esc =='x' ) { esc++; -if (kstrtoul (esc,10 , &lcd_addr_x) <0 ) -break ; + lcd_addr_x =simple_strtoul (esc, &endp,10 ); + esc = endp; }else if (*esc =='y' ) { esc++; -if (kstrtoul (esc,10 , &lcd_addr_y) <0 ) -break ; + lcd_addr_y =simple_strtoul (esc, &endp,10 ); + esc = endp; }else break ; }