* [PATCH 3/3] staging:panel: Fix cursor positioning escapes
@ 2012-06-28 20:58 Zoltan Kelemen
0 siblings, 0 replies; only message in thread
From: Zoltan Kelemen @ 2012-06-28 20:58 UTC (permalink / raw)
To: willy, gregkh; +Cc: devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2: panel-patch3 --]
[-- Type: text/plain, Size: 1064 bytes --]
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 <zoltan@digisec.se>
----
diff -ru linux-next/drivers/staging/panel/panel.c panel-patch3/drivers/staging/panel/panel.c
--- linux-next/drivers/staging/panel/panel.c 2012-06-28 13:10:37.274466384 +0200
+++ panel-patch3/drivers/staging/panel/panel.c 2012-06-28 13:42:22.514445057 +0200
@@ -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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-06-28 20:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-28 20:58 [PATCH 3/3] staging:panel: Fix cursor positioning escapes Zoltan Kelemen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.