[PATCH 3/3] staging:panel: Fix cursor positioning escapes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
----
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;
 		}
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux