staging: xgifb: vb_init: use readl()/writel() to access iomapped memory
authorAaro Koskinen <aaro.koskinen@iki.fi>
Tue, 13 Sep 2011 19:49:33 +0000 (22:49 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 16 Sep 2011 18:16:48 +0000 (20:16 +0200)
commitc44fa627c7b351cb359b7bd373756776b907ecd5
tree0df5300ac4eae6985555bcf3c0f54de280510b51
parent4b4954621ff57e168ebd77b7d2682308d13b4e7f
staging: xgifb: vb_init: use readl()/writel() to access iomapped memory

Use readl() and writel() in FB memory test instead of direct pointer
access, and also add iomem annotations for the FB memory.

The patch eliminates the following sparse warnings:

drivers/staging/xgifb/XGI_main_26.c:2113:69: warning: incorrect type in assignment (different address spaces)
drivers/staging/xgifb/XGI_main_26.c:2113:69:    expected unsigned char *static [addressable] [toplevel] [assigned] pjVideoMemoryAddress
drivers/staging/xgifb/XGI_main_26.c:2113:69:    got void [noderef] <asn:2>*
drivers/staging/xgifb/XGI_main_26.c:2399:30: warning: incorrect type in assignment (different address spaces)
drivers/staging/xgifb/XGI_main_26.c:2399:30:    expected char [noderef] <asn:2>*screen_base
drivers/staging/xgifb/XGI_main_26.c:2399:30:    got char *[addressable] [toplevel] [assigned] video_vbase
drivers/staging/xgifb/XGI_main_26.c:2430:31: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/xgifb/XGI_main_26.c:2430:31:    expected void volatile [noderef] <asn:2>*addr
drivers/staging/xgifb/XGI_main_26.c:2430:31:    got char *[addressable] [toplevel] [assigned] video_vbase
drivers/staging/xgifb/XGI_main_26.c:2454:31: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/xgifb/XGI_main_26.c:2454:31:    expected void volatile [noderef] <asn:2>*addr
drivers/staging/xgifb/XGI_main_26.c:2454:31:    got char *[addressable] [toplev

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/xgifb/XGIfb.h
drivers/staging/xgifb/vb_init.c
drivers/staging/xgifb/vb_struct.h
drivers/staging/xgifb/vgatypes.h