diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2007-05-10 13:40:51 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-05-11 12:19:02 -0400 |
commit | 10bdaaa0fad620145cf10e2b573266b2d80b44de (patch) | |
tree | 8d3200f5041ab0fdc72e9245ef780310b27a18d8 /drivers/net/arm/ether1.c | |
parent | c7b87f3d5037a35b5c7bb916ffc826be3fcb208d (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/ether1.c')
-rw-r--r-- | drivers/net/arm/ether1.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/net/arm/ether1.c b/drivers/net/arm/ether1.c index f075cebe84ad..f21148e7b579 100644 --- a/drivers/net/arm/ether1.c +++ b/drivers/net/arm/ether1.c | |||
@@ -1014,8 +1014,7 @@ ether1_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
1014 | SET_NETDEV_DEV(dev, &ec->dev); | 1014 | SET_NETDEV_DEV(dev, &ec->dev); |
1015 | 1015 | ||
1016 | dev->irq = ec->irq; | 1016 | dev->irq = ec->irq; |
1017 | priv(dev)->base = ioremap(ecard_resource_start(ec, ECARD_RES_IOCFAST), | 1017 | priv(dev)->base = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, 0); |
1018 | ecard_resource_len(ec, ECARD_RES_IOCFAST)); | ||
1019 | if (!priv(dev)->base) { | 1018 | if (!priv(dev)->base) { |
1020 | ret = -ENOMEM; | 1019 | ret = -ENOMEM; |
1021 | goto free; | 1020 | goto free; |
@@ -1056,8 +1055,6 @@ ether1_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
1056 | return 0; | 1055 | return 0; |
1057 | 1056 | ||
1058 | free: | 1057 | free: |
1059 | if (priv(dev)->base) | ||
1060 | iounmap(priv(dev)->base); | ||
1061 | free_netdev(dev); | 1058 | free_netdev(dev); |
1062 | release: | 1059 | release: |
1063 | ecard_release_resources(ec); | 1060 | ecard_release_resources(ec); |
@@ -1072,7 +1069,6 @@ static void __devexit ether1_remove(struct expansion_card *ec) | |||
1072 | ecard_set_drvdata(ec, NULL); | 1069 | ecard_set_drvdata(ec, NULL); |
1073 | 1070 | ||
1074 | unregister_netdev(dev); | 1071 | unregister_netdev(dev); |
1075 | iounmap(priv(dev)->base); | ||
1076 | free_netdev(dev); | 1072 | free_netdev(dev); |
1077 | ecard_release_resources(ec); | 1073 | ecard_release_resources(ec); |
1078 | } | 1074 | } |