diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-06-19 14:12:34 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-06-24 09:33:42 -0400 |
commit | c5081d5f4775b2a3f858f91151bbf9163e473075 (patch) | |
tree | 8e9e077e8011fd7bf888b491711933f8c90f0cf0 /drivers/pcmcia/rsrc_nonstatic.c | |
parent | c502380170ee93fd1f4028cc1f32efc87fde7376 (diff) |
pcmcia: simplify pccard_validate_cis
As cisinfo_t only contains one unsigned_int, pccard_validate_cis can
be simplified by passing that around directly.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/rsrc_nonstatic.c')
-rw-r--r-- | drivers/pcmcia/rsrc_nonstatic.c | 11 |
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 */ |
264 | static int readable(struct pcmcia_socket *s, struct resource *res, cisinfo_t *info) | 264 | static 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 | |||
316 | cis_readable(struct pcmcia_socket *s, unsigned long base, unsigned long size) | 317 | cis_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 | ||
336 | static int | 337 | static int |