staging: panel: Fixed checkpatch warning about simple_strtoul()
authorPelle Windestam <iceaway@gmail.com>
Tue, 30 Aug 2011 18:29:24 +0000 (20:29 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 6 Sep 2011 23:49:29 +0000 (16:49 -0700)
Fixed the checkpatch warning about sing simple_strtoul instead of
kstrtoul() in panel.c.

Signed-off-by: Pelle Windestam <iceaway@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/panel/panel.c

index b303b7e42b63de6044e7d588bd5ba88b78ef7b38..4683d5f355c01f0d3860bd0a83a1a4d6e64ac29b 100644 (file)
@@ -1179,16 +1179,14 @@ static inline int handle_lcd_special_code(void)
                        break;
 
                while (*esc) {
-                       char *endp;
-
                        if (*esc == 'x') {
                                esc++;
-                               lcd_addr_x = simple_strtoul(esc, &endp, 10);
-                               esc = endp;
+                               if (kstrtoul(esc, 10, &lcd_addr_x) < 0)
+                                       break;
                        } else if (*esc == 'y') {
                                esc++;
-                               lcd_addr_y = simple_strtoul(esc, &endp, 10);
-                               esc = endp;
+                               if (kstrtoul(esc, 10, &lcd_addr_y) < 0)
+                                       break;
                        } else
                                break;
                }