diff options
Diffstat (limited to 'drivers/net/arm/etherh.c')
-rw-r--r-- | drivers/net/arm/etherh.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/net/arm/etherh.c b/drivers/net/arm/etherh.c index 61f574aa3a99..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; |
@@ -710,8 +710,7 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
710 | * IRQ and control port handling - only for non-NIC slot cards. | 710 | * IRQ and control port handling - only for non-NIC slot cards. |
711 | */ | 711 | */ |
712 | if (ec->slot_no != 8) { | 712 | if (ec->slot_no != 8) { |
713 | ec->ops = ðerh_ops; | 713 | ecard_setirq(ec, ðerh_ops, eh); |
714 | ec->irq_data = eh; | ||
715 | } else { | 714 | } else { |
716 | /* | 715 | /* |
717 | * If we're in the NIC slot, make sure the IRQ is enabled | 716 | * If we're in the NIC slot, make sure the IRQ is enabled |
@@ -759,10 +758,6 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
759 | return 0; | 758 | return 0; |
760 | 759 | ||
761 | free: | 760 | free: |
762 | if (eh->ioc_fast) | ||
763 | iounmap(eh->ioc_fast); | ||
764 | if (eh->memc) | ||
765 | iounmap(eh->memc); | ||
766 | free_netdev(dev); | 761 | free_netdev(dev); |
767 | release: | 762 | release: |
768 | ecard_release_resources(ec); | 763 | ecard_release_resources(ec); |
@@ -773,16 +768,10 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
773 | static void __devexit etherh_remove(struct expansion_card *ec) | 768 | static void __devexit etherh_remove(struct expansion_card *ec) |
774 | { | 769 | { |
775 | struct net_device *dev = ecard_get_drvdata(ec); | 770 | struct net_device *dev = ecard_get_drvdata(ec); |
776 | struct etherh_priv *eh = etherh_priv(dev); | ||
777 | 771 | ||
778 | ecard_set_drvdata(ec, NULL); | 772 | ecard_set_drvdata(ec, NULL); |
779 | 773 | ||
780 | unregister_netdev(dev); | 774 | unregister_netdev(dev); |
781 | ec->ops = NULL; | ||
782 | |||
783 | if (eh->ioc_fast) | ||
784 | iounmap(eh->ioc_fast); | ||
785 | iounmap(eh->memc); | ||
786 | 775 | ||
787 | free_netdev(dev); | 776 | free_netdev(dev); |
788 | 777 | ||