aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/arm/ether3.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/net/arm/ether3.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/net/arm/ether3.c')
-rw-r--r--drivers/net/arm/ether3.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/net/arm/ether3.c b/drivers/net/arm/ether3.c
index 32da2eb9bcee..da713500654d 100644
--- a/drivers/net/arm/ether3.c
+++ b/drivers/net/arm/ether3.c
@@ -793,8 +793,7 @@ ether3_probe(struct expansion_card *ec, const struct ecard_id *id)
793 SET_MODULE_OWNER(dev); 793 SET_MODULE_OWNER(dev);
794 SET_NETDEV_DEV(dev, &ec->dev); 794 SET_NETDEV_DEV(dev, &ec->dev);
795 795
796 priv(dev)->base = ioremap(ecard_resource_start(ec, ECARD_RES_MEMC), 796 priv(dev)->base = ecardm_iomap(ec, ECARD_RES_MEMC, 0, 0);
797 ecard_resource_len(ec, ECARD_RES_MEMC));
798 if (!priv(dev)->base) { 797 if (!priv(dev)->base) {
799 ret = -ENOMEM; 798 ret = -ENOMEM;
800 goto free; 799 goto free;
@@ -869,8 +868,6 @@ ether3_probe(struct expansion_card *ec, const struct ecard_id *id)
869 return 0; 868 return 0;
870 869
871 free: 870 free:
872 if (priv(dev)->base)
873 iounmap(priv(dev)->base);
874 free_netdev(dev); 871 free_netdev(dev);
875 release: 872 release:
876 ecard_release_resources(ec); 873 ecard_release_resources(ec);
@@ -885,7 +882,6 @@ static void __devexit ether3_remove(struct expansion_card *ec)
885 ecard_set_drvdata(ec, NULL); 882 ecard_set_drvdata(ec, NULL);
886 883
887 unregister_netdev(dev); 884 unregister_netdev(dev);
888 iounmap(priv(dev)->base);
889 free_netdev(dev); 885 free_netdev(dev);
890 ecard_release_resources(ec); 886 ecard_release_resources(ec);
891} 887}