aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/arm/cumana_2.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2007-05-10 13:40:51 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-05-11 12:19:02 -0400
commit10bdaaa0fad620145cf10e2b573266b2d80b44de (patch)
tree8d3200f5041ab0fdc72e9245ef780310b27a18d8 /drivers/scsi/arm/cumana_2.c
parentc7b87f3d5037a35b5c7bb916ffc826be3fcb208d (diff)
[ARM] ecard: add ecardm_iomap() / ecardm_iounmap()
Add devres ecardm_iomap() and ecardm_iounmap() for Acorn expansion cards. Convert all expansion card drivers to use them. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/scsi/arm/cumana_2.c')
-rw-r--r--drivers/scsi/arm/cumana_2.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/scsi/arm/cumana_2.c b/drivers/scsi/arm/cumana_2.c
index f51aa3446bc7..68a64123af8f 100644
--- a/drivers/scsi/arm/cumana_2.c
+++ b/drivers/scsi/arm/cumana_2.c
@@ -401,7 +401,6 @@ cumanascsi2_probe(struct expansion_card *ec, const struct ecard_id *id)
401{ 401{
402 struct Scsi_Host *host; 402 struct Scsi_Host *host;
403 struct cumanascsi2_info *info; 403 struct cumanascsi2_info *info;
404 unsigned long resbase, reslen;
405 void __iomem *base; 404 void __iomem *base;
406 int ret; 405 int ret;
407 406
@@ -409,9 +408,7 @@ cumanascsi2_probe(struct expansion_card *ec, const struct ecard_id *id)
409 if (ret) 408 if (ret)
410 goto out; 409 goto out;
411 410
412 resbase = ecard_resource_start(ec, ECARD_RES_MEMC); 411 base = ecardm_iomap(ec, ECARD_RES_MEMC, 0, 0);
413 reslen = ecard_resource_len(ec, ECARD_RES_MEMC);
414 base = ioremap(resbase, reslen);
415 if (!base) { 412 if (!base) {
416 ret = -ENOMEM; 413 ret = -ENOMEM;
417 goto out_region; 414 goto out_region;
@@ -421,7 +418,7 @@ cumanascsi2_probe(struct expansion_card *ec, const struct ecard_id *id)
421 sizeof(struct cumanascsi2_info)); 418 sizeof(struct cumanascsi2_info));
422 if (!host) { 419 if (!host) {
423 ret = -ENOMEM; 420 ret = -ENOMEM;
424 goto out_unmap; 421 goto out_region;
425 } 422 }
426 423
427 ecard_set_drvdata(ec, host); 424 ecard_set_drvdata(ec, host);
@@ -490,9 +487,6 @@ cumanascsi2_probe(struct expansion_card *ec, const struct ecard_id *id)
490 out_free: 487 out_free:
491 scsi_host_put(host); 488 scsi_host_put(host);
492 489
493 out_unmap:
494 iounmap(base);
495
496 out_region: 490 out_region:
497 ecard_release_resources(ec); 491 ecard_release_resources(ec);
498 492
@@ -512,8 +506,6 @@ static void __devexit cumanascsi2_remove(struct expansion_card *ec)
512 free_dma(info->info.scsi.dma); 506 free_dma(info->info.scsi.dma);
513 free_irq(ec->irq, info); 507 free_irq(ec->irq, info);
514 508
515 iounmap(info->base);
516
517 fas216_release(host); 509 fas216_release(host);
518 scsi_host_put(host); 510 scsi_host_put(host);
519 ecard_release_resources(ec); 511 ecard_release_resources(ec);