]> git.baikalelectronics.ru Git - kernel.git/commit
staging: panel: fix sparse warnings in lcd_write
authorBastien Armand <armand.bastien@laposte.net>
Fri, 18 Apr 2014 16:10:57 +0000 (18:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Apr 2014 23:17:12 +0000 (16:17 -0700)
commitb93c6d13af9088ce205699132c8fe4f33febfdd0
tree24399bd6b7438f4a7bee0cbe989d372e6c7c67b7
parent82c14b5f5f7eae46a746d11ef7d293185d54a296
staging: panel: fix sparse warnings in lcd_write

This patch fixes two sparse warnings related to lcd_write :
warning: incorrect type in argument 1 (different address spaces)
warning: incorrect type in initializer (incompatible argument 2
(different address spaces))

lcd_write can be used from kernel space (in panel_lcd_print) or from user
space. So we introduce the lcd_write_char function that will write a char to
the device. We modify lcd_write and panel_lcd_print to use it. Finally we add
__user annotation missing in lcd_write.

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