diff options
Diffstat (limited to 'drivers/net/arm')
-rw-r--r-- | drivers/net/arm/ether1.c | 6 | ||||
-rw-r--r-- | drivers/net/arm/ether3.c | 6 | ||||
-rw-r--r-- | drivers/net/arm/etherh.c | 13 |
3 files changed, 4 insertions, 21 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 | } |
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 | } |
diff --git a/drivers/net/arm/etherh.c b/drivers/net/arm/etherh.c index 387f1e3a4e84..769ba69451f4 100644 --- a/drivers/net/arm/etherh.c +++ b/drivers/net/arm/etherh.c | |||
@@ -686,7 +686,7 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
686 | eh->supported = data->supported; | 686 | eh->supported = data->supported; |
687 | eh->ctrl = 0; | 687 | eh->ctrl = 0; |
688 | eh->id = ec->cid.product; | 688 | eh->id = ec->cid.product; |
689 | eh->memc = ioremap(ecard_resource_start(ec, ECARD_RES_MEMC), PAGE_SIZE); | 689 | eh->memc = ecardm_iomap(ec, ECARD_RES_MEMC, 0, PAGE_SIZE); |
690 | if (!eh->memc) { | 690 | if (!eh->memc) { |
691 | ret = -ENOMEM; | 691 | ret = -ENOMEM; |
692 | goto free; | 692 | goto free; |
@@ -694,7 +694,7 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
694 | 694 | ||
695 | eh->ctrl_port = eh->memc; | 695 | eh->ctrl_port = eh->memc; |
696 | if (data->ctrl_ioc) { | 696 | if (data->ctrl_ioc) { |
697 | eh->ioc_fast = ioremap(ecard_resource_start(ec, ECARD_RES_IOCFAST), PAGE_SIZE); | 697 | eh->ioc_fast = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, PAGE_SIZE); |
698 | if (!eh->ioc_fast) { | 698 | if (!eh->ioc_fast) { |
699 | ret = -ENOMEM; | 699 | ret = -ENOMEM; |
700 | goto free; | 700 | goto free; |
@@ -758,10 +758,6 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
758 | return 0; | 758 | return 0; |
759 | 759 | ||
760 | free: | 760 | free: |
761 | if (eh->ioc_fast) | ||
762 | iounmap(eh->ioc_fast); | ||
763 | if (eh->memc) | ||
764 | iounmap(eh->memc); | ||
765 | free_netdev(dev); | 761 | free_netdev(dev); |
766 | release: | 762 | release: |
767 | ecard_release_resources(ec); | 763 | ecard_release_resources(ec); |
@@ -772,16 +768,11 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
772 | static void __devexit etherh_remove(struct expansion_card *ec) | 768 | static void __devexit etherh_remove(struct expansion_card *ec) |
773 | { | 769 | { |
774 | struct net_device *dev = ecard_get_drvdata(ec); | 770 | struct net_device *dev = ecard_get_drvdata(ec); |
775 | struct etherh_priv *eh = etherh_priv(dev); | ||
776 | 771 | ||
777 | ecard_set_drvdata(ec, NULL); | 772 | ecard_set_drvdata(ec, NULL); |
778 | 773 | ||
779 | unregister_netdev(dev); | 774 | unregister_netdev(dev); |
780 | 775 | ||
781 | if (eh->ioc_fast) | ||
782 | iounmap(eh->ioc_fast); | ||
783 | iounmap(eh->memc); | ||
784 | |||
785 | free_netdev(dev); | 776 | free_netdev(dev); |
786 | 777 | ||
787 | ecard_release_resources(ec); | 778 | ecard_release_resources(ec); |