Skip to contentSkip to conversation

staging: panel: fix sparse warnings in keypad_read

PATCH In review Bastien Armand 1 participant 1 message Apr 18, 2014 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 staging: panel: fix sparse warnings in keypad_read

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))

---
 drivers/staging/panel/panel.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/panel/panel.c +2 -2
index 08f9a48..1569e26 100644
@@ -1571,11 +1571,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)

--
1.7.10.4