staging: panel: fix sparse warnings in keypad_read
authorBastien Armand <armand.bastien@laposte.net>
Fri, 18 Apr 2014 16:10:08 +0000 (18:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Apr 2014 23:17:12 +0000 (16:17 -0700)
This patch fixes two sparse warnings related to keypad_read :
warning: incorrect type in argument 1 (different address spaces)
warning: incorrect type in initializer (incompatible argument 2 (different address spaces))

Signed-off-by: Bastien Armand <armand.bastien@laposte.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/panel/panel.c

index e2e3c6bc3a6cc1af9f53a8b63c823f3fb602603b..a5087cbfdef4c61b4ed8f4a01bbfd01daceb0de9 100644 (file)
@@ -1584,11 +1584,11 @@ static void lcd_init(void)
  */
 
 static ssize_t keypad_read(struct file *file,
-                          char *buf, size_t count, loff_t *ppos)
+                          char __user *buf, size_t count, loff_t *ppos)
 {
 
        unsigned i = *ppos;
-       char *tmp = buf;
+       char __user *tmp = buf;
 
        if (keypad_buflen == 0) {
                if (file->f_flags & O_NONBLOCK)