diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2011-09-13 22:49:31 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-16 20:16:47 +0200 |
commit | 863c02af581e0d1b0cf57e9f3b785572bcfcd980 (patch) | |
tree | a6ac67821c0c076ce76a41653827f8e7fcde6092 /drivers/staging/xgifb/XGIfb.h | |
parent | d15cce50161bbb46236f9c50ab044c795cbbecc0 (diff) | |
download | linux-863c02af581e0d1b0cf57e9f3b785572bcfcd980.tar.bz2 |
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>
Diffstat (limited to 'drivers/staging/xgifb/XGIfb.h')
-rw-r--r-- | drivers/staging/xgifb/XGIfb.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/xgifb/XGIfb.h b/drivers/staging/xgifb/XGIfb.h index 5d81cb69e63c..12e1a3e330b7 100644 --- a/drivers/staging/xgifb/XGIfb.h +++ b/drivers/staging/xgifb/XGIfb.h @@ -59,7 +59,7 @@ struct video_info { char *video_vbase; unsigned long mmio_base; unsigned long mmio_size; - char *mmio_vbase; + void __iomem *mmio_vbase; unsigned long vga_base; unsigned long mtrr; |