Commit 8993d879 authored by Linus Torvalds's avatar Linus Torvalds Committed by Linus Torvalds

pcmcia: add iomem sparse annotations.

It was pretty clean already, adding the proper annotations
to the base pointers and a few functions was all it took
to make sparse happy about the PCI accesses.
parent 78b962bd
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
=====================================================================*/ =====================================================================*/
static u_int xlate_rom_addr(u_char * b, u_int addr) static u_int xlate_rom_addr(void __iomem *b, u_int addr)
{ {
u_int img = 0, ofs = 0, sz; u_int img = 0, ofs = 0, sz;
u_short data; u_short data;
......
...@@ -103,7 +103,7 @@ void release_cis_mem(struct pcmcia_socket *s) ...@@ -103,7 +103,7 @@ void release_cis_mem(struct pcmcia_socket *s)
* If flags & MAP_ATTRIB, map the attribute space, otherwise * If flags & MAP_ATTRIB, map the attribute space, otherwise
* map the memory space. * map the memory space.
*/ */
static unsigned char * static void __iomem *
set_cis_map(struct pcmcia_socket *s, unsigned int card_offset, unsigned int flags) set_cis_map(struct pcmcia_socket *s, unsigned int card_offset, unsigned int flags)
{ {
pccard_mem_map *mem = &s->cis_mem; pccard_mem_map *mem = &s->cis_mem;
...@@ -141,7 +141,8 @@ set_cis_map(struct pcmcia_socket *s, unsigned int card_offset, unsigned int flag ...@@ -141,7 +141,8 @@ set_cis_map(struct pcmcia_socket *s, unsigned int card_offset, unsigned int flag
int read_cis_mem(struct pcmcia_socket *s, int attr, u_int addr, int read_cis_mem(struct pcmcia_socket *s, int attr, u_int addr,
u_int len, void *ptr) u_int len, void *ptr)
{ {
u_char *sys, *end, *buf = ptr; void __iomem *sys, *end;
unsigned char *buf = ptr;
cs_dbg(s, 3, "read_cis_mem(%d, %#x, %u)\n", attr, addr, len); cs_dbg(s, 3, "read_cis_mem(%d, %#x, %u)\n", attr, addr, len);
...@@ -204,7 +205,8 @@ int read_cis_mem(struct pcmcia_socket *s, int attr, u_int addr, ...@@ -204,7 +205,8 @@ int read_cis_mem(struct pcmcia_socket *s, int attr, u_int addr,
void write_cis_mem(struct pcmcia_socket *s, int attr, u_int addr, void write_cis_mem(struct pcmcia_socket *s, int attr, u_int addr,
u_int len, void *ptr) u_int len, void *ptr)
{ {
u_char *sys, *end, *buf = ptr; void __iomem *sys, *end;
unsigned char *buf = ptr;
cs_dbg(s, 3, "write_cis_mem(%d, %#x, %u)\n", attr, addr, len); cs_dbg(s, 3, "write_cis_mem(%d, %#x, %u)\n", attr, addr, len);
......
...@@ -321,7 +321,7 @@ static int checksum(struct pcmcia_socket *s, struct resource *res) ...@@ -321,7 +321,7 @@ static int checksum(struct pcmcia_socket *s, struct resource *res)
{ {
pccard_mem_map map; pccard_mem_map map;
int i, a = 0, b = -1, d; int i, a = 0, b = -1, d;
void *virt; void __iomem *virt;
virt = ioremap(res->start, s->map_size); virt = ioremap(res->start, s->map_size);
if (virt) { if (virt) {
......
...@@ -107,7 +107,7 @@ struct cardbus_type { ...@@ -107,7 +107,7 @@ struct cardbus_type {
struct yenta_socket { struct yenta_socket {
struct pci_dev *dev; struct pci_dev *dev;
int cb_irq, io_irq; int cb_irq, io_irq;
void *base; void __iomem *base;
struct timer_list poll_timer; struct timer_list poll_timer;
struct pcmcia_socket socket; struct pcmcia_socket socket;
......
...@@ -176,7 +176,7 @@ struct pcmcia_socket { ...@@ -176,7 +176,7 @@ struct pcmcia_socket {
u_short lock_count; u_short lock_count;
client_handle_t clients; client_handle_t clients;
pccard_mem_map cis_mem; pccard_mem_map cis_mem;
u_char *cis_virt; void __iomem *cis_virt;
struct config_t *config; struct config_t *config;
struct { struct {
u_int AssignedIRQ; u_int AssignedIRQ;
...@@ -227,7 +227,7 @@ struct pcmcia_socket { ...@@ -227,7 +227,7 @@ struct pcmcia_socket {
/* cardbus (32-bit) */ /* cardbus (32-bit) */
#ifdef CONFIG_CARDBUS #ifdef CONFIG_CARDBUS
struct resource * cb_cis_res; struct resource * cb_cis_res;
u_char *cb_cis_virt; void __iomem *cb_cis_virt;
#endif #endif
/* socket device */ /* socket device */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment