aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/rsrc_nonstatic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pcmcia/rsrc_nonstatic.c')
-rw-r--r--drivers/pcmcia/rsrc_nonstatic.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c
index 162693480ed0..70d2e010e654 100644
--- a/drivers/pcmcia/rsrc_nonstatic.c
+++ b/drivers/pcmcia/rsrc_nonstatic.c
@@ -261,21 +261,22 @@ static void do_io_probe(struct pcmcia_socket *s, unsigned int base,
261======================================================================*/ 261======================================================================*/
262 262
263/* Validation function for cards with a valid CIS */ 263/* Validation function for cards with a valid CIS */
264static int readable(struct pcmcia_socket *s, struct resource *res, cisinfo_t *info) 264static int readable(struct pcmcia_socket *s, struct resource *res,
265 unsigned int *count)
265{ 266{
266 int ret = -1; 267 int ret = -1;
267 268
268 s->cis_mem.res = res; 269 s->cis_mem.res = res;
269 s->cis_virt = ioremap(res->start, s->map_size); 270 s->cis_virt = ioremap(res->start, s->map_size);
270 if (s->cis_virt) { 271 if (s->cis_virt) {
271 ret = pccard_validate_cis(s, BIND_FN_ALL, info); 272 ret = pccard_validate_cis(s, BIND_FN_ALL, count);
272 /* invalidate mapping and CIS cache */ 273 /* invalidate mapping and CIS cache */
273 iounmap(s->cis_virt); 274 iounmap(s->cis_virt);
274 s->cis_virt = NULL; 275 s->cis_virt = NULL;
275 destroy_cis_cache(s); 276 destroy_cis_cache(s);
276 } 277 }
277 s->cis_mem.res = NULL; 278 s->cis_mem.res = NULL;
278 if ((ret != 0) || (info->Chains == 0)) 279 if ((ret != 0) || (count == 0))
279 return 0; 280 return 0;
280 return 1; 281 return 1;
281} 282}
@@ -316,7 +317,7 @@ static int
316cis_readable(struct pcmcia_socket *s, unsigned long base, unsigned long size) 317cis_readable(struct pcmcia_socket *s, unsigned long base, unsigned long size)
317{ 318{
318 struct resource *res1, *res2; 319 struct resource *res1, *res2;
319 cisinfo_t info1, info2; 320 unsigned int info1, info2;
320 int ret = 0; 321 int ret = 0;
321 322
322 res1 = claim_region(s, base, size/2, IORESOURCE_MEM, "cs memory probe"); 323 res1 = claim_region(s, base, size/2, IORESOURCE_MEM, "cs memory probe");
@@ -330,7 +331,7 @@ cis_readable(struct pcmcia_socket *s, unsigned long base, unsigned long size)
330 free_region(res2); 331 free_region(res2);
331 free_region(res1); 332 free_region(res1);
332 333
333 return (ret == 2) && (info1.Chains == info2.Chains); 334 return (ret == 2) && (info1 == info2);
334} 335}
335 336
336static int 337static int