diff options
Diffstat (limited to 'drivers/pcmcia/cistpl.c')
-rw-r--r-- | drivers/pcmcia/cistpl.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c index 8844bc3e3118..91414a0ddc44 100644 --- a/drivers/pcmcia/cistpl.c +++ b/drivers/pcmcia/cistpl.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <asm/byteorder.h> | 27 | #include <asm/byteorder.h> |
28 | #include <asm/unaligned.h> | 28 | #include <asm/unaligned.h> |
29 | 29 | ||
30 | #include <pcmcia/cs_types.h> | ||
31 | #include <pcmcia/ss.h> | 30 | #include <pcmcia/ss.h> |
32 | #include <pcmcia/cs.h> | 31 | #include <pcmcia/cs.h> |
33 | #include <pcmcia/cisreg.h> | 32 | #include <pcmcia/cisreg.h> |
@@ -54,6 +53,9 @@ static const u_int exponent[] = { | |||
54 | /* Upper limit on reasonable # of tuples */ | 53 | /* Upper limit on reasonable # of tuples */ |
55 | #define MAX_TUPLES 200 | 54 | #define MAX_TUPLES 200 |
56 | 55 | ||
56 | /* Bits in IRQInfo1 field */ | ||
57 | #define IRQ_INFO2_VALID 0x10 | ||
58 | |||
57 | /* 16-bit CIS? */ | 59 | /* 16-bit CIS? */ |
58 | static int cis_width; | 60 | static int cis_width; |
59 | module_param(cis_width, int, 0444); | 61 | module_param(cis_width, int, 0444); |
@@ -210,7 +212,7 @@ int pcmcia_read_cis_mem(struct pcmcia_socket *s, int attr, u_int addr, | |||
210 | * Probably only useful for writing one-byte registers. Must be called | 212 | * Probably only useful for writing one-byte registers. Must be called |
211 | * with ops_mutex held. | 213 | * with ops_mutex held. |
212 | */ | 214 | */ |
213 | void pcmcia_write_cis_mem(struct pcmcia_socket *s, int attr, u_int addr, | 215 | int pcmcia_write_cis_mem(struct pcmcia_socket *s, int attr, u_int addr, |
214 | u_int len, void *ptr) | 216 | u_int len, void *ptr) |
215 | { | 217 | { |
216 | void __iomem *sys, *end; | 218 | void __iomem *sys, *end; |
@@ -232,7 +234,7 @@ void pcmcia_write_cis_mem(struct pcmcia_socket *s, int attr, u_int addr, | |||
232 | ((cis_width) ? MAP_16BIT : 0)); | 234 | ((cis_width) ? MAP_16BIT : 0)); |
233 | if (!sys) { | 235 | if (!sys) { |
234 | dev_dbg(&s->dev, "could not map memory\n"); | 236 | dev_dbg(&s->dev, "could not map memory\n"); |
235 | return; /* FIXME: Error */ | 237 | return -EINVAL; |
236 | } | 238 | } |
237 | 239 | ||
238 | writeb(flags, sys+CISREG_ICTRL0); | 240 | writeb(flags, sys+CISREG_ICTRL0); |
@@ -257,7 +259,7 @@ void pcmcia_write_cis_mem(struct pcmcia_socket *s, int attr, u_int addr, | |||
257 | sys = set_cis_map(s, card_offset, flags); | 259 | sys = set_cis_map(s, card_offset, flags); |
258 | if (!sys) { | 260 | if (!sys) { |
259 | dev_dbg(&s->dev, "could not map memory\n"); | 261 | dev_dbg(&s->dev, "could not map memory\n"); |
260 | return; /* FIXME: error */ | 262 | return -EINVAL; |
261 | } | 263 | } |
262 | 264 | ||
263 | end = sys + s->map_size; | 265 | end = sys + s->map_size; |
@@ -271,6 +273,7 @@ void pcmcia_write_cis_mem(struct pcmcia_socket *s, int attr, u_int addr, | |||
271 | addr = 0; | 273 | addr = 0; |
272 | } | 274 | } |
273 | } | 275 | } |
276 | return 0; | ||
274 | } | 277 | } |
275 | 278 | ||
276 | 279 | ||