staging: xgifb: main: use readb()/readw() to access iomapped memory
authorAaro Koskinen <aaro.koskinen@iki.fi>
Tue, 13 Sep 2011 19:49:31 +0000 (22:49 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 16 Sep 2011 18:16:47 +0000 (20:16 +0200)
commit863c02af581e0d1b0cf57e9f3b785572bcfcd980
treea6ac67821c0c076ce76a41653827f8e7fcde6092
parentd15cce50161bbb46236f9c50ab044c795cbbecc0
staging: xgifb: main: use readb()/readw() to access iomapped memory

Use readb()/readw() instead of direct pointer access to read I/O mapped
memory and also add __iomem annotation.

The patch eliminates the following sparse warnings:

drivers/staging/xgifb/XGI_main_26.c:2125:35: warning: incorrect type in assignment (different address spaces)
drivers/staging/xgifb/XGI_main_26.c:2125:35:    expected char *[addressable] [toplevel] [assigned] mmio_vbase
drivers/staging/xgifb/XGI_main_26.c:2125:35:    got void [noderef] <asn:2>*
drivers/staging/xgifb/XGI_main_26.c:2439:31: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/xgifb/XGI_main_26.c:2439:31:    expected void volatile [noderef] <asn:2>*addr
drivers/staging/xgifb/XGI_main_26.c:2439:31:    got char *[addressable] [toplevel] [assigned] mmio_vbase
drivers/staging/xgifb/XGI_main_26.c:2463:31: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/xgifb/XGI_main_26.c:2463:31:    expected void volatile [noderef] <asn:2>*addr
drivers/staging/xgifb/XGI_main_26.c:2463:31:    got char *[addressable] [toplevel] [assigned] mmio_vbase

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