X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fnet%2Farm%2Fetherh.c;h=0d37d9d1fd787e2631c53b6982137fe38c6496d2;hb=7578634990fb47cc30083fbd812689aa6deacfc0;hp=f3faa4fe58e7a1a56d382f4fc0c28ac537edfe63;hpb=bef986502fa398b1785a3979b1aa17cd902d3527;p=pandora-kernel.git diff --git a/drivers/net/arm/etherh.c b/drivers/net/arm/etherh.c index f3faa4fe58e7..0d37d9d1fd78 100644 --- a/drivers/net/arm/etherh.c +++ b/drivers/net/arm/etherh.c @@ -28,11 +28,9 @@ #include #include -#include #include #include #include -#include #include #include #include @@ -587,7 +585,7 @@ static void etherh_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *i { strlcpy(info->driver, DRV_NAME, sizeof(info->driver)); strlcpy(info->version, DRV_VERSION, sizeof(info->version)); - strlcpy(info->bus_info, dev->class_dev.dev->bus_id, + strlcpy(info->bus_info, dev->dev.parent->bus_id, sizeof(info->bus_info)); } @@ -687,7 +685,7 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id) eh->supported = data->supported; eh->ctrl = 0; eh->id = ec->cid.product; - eh->memc = ioremap(ecard_resource_start(ec, ECARD_RES_MEMC), PAGE_SIZE); + eh->memc = ecardm_iomap(ec, ECARD_RES_MEMC, 0, PAGE_SIZE); if (!eh->memc) { ret = -ENOMEM; goto free; @@ -695,7 +693,7 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id) eh->ctrl_port = eh->memc; if (data->ctrl_ioc) { - eh->ioc_fast = ioremap(ecard_resource_start(ec, ECARD_RES_IOCFAST), PAGE_SIZE); + eh->ioc_fast = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, PAGE_SIZE); if (!eh->ioc_fast) { ret = -ENOMEM; goto free; @@ -711,8 +709,7 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id) * IRQ and control port handling - only for non-NIC slot cards. */ if (ec->slot_no != 8) { - ec->ops = ðerh_ops; - ec->irq_data = eh; + ecard_setirq(ec, ðerh_ops, eh); } else { /* * If we're in the NIC slot, make sure the IRQ is enabled @@ -760,10 +757,6 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id) return 0; free: - if (eh->ioc_fast) - iounmap(eh->ioc_fast); - if (eh->memc) - iounmap(eh->memc); free_netdev(dev); release: ecard_release_resources(ec); @@ -774,16 +767,10 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id) static void __devexit etherh_remove(struct expansion_card *ec) { struct net_device *dev = ecard_get_drvdata(ec); - struct etherh_priv *eh = etherh_priv(dev); ecard_set_drvdata(ec, NULL); unregister_netdev(dev); - ec->ops = NULL; - - if (eh->ioc_fast) - iounmap(eh->ioc_fast); - iounmap(eh->memc); free_netdev(dev);