diff options
Diffstat (limited to 'drivers/net/fec.c')
-rw-r--r-- | drivers/net/fec.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/fec.c b/drivers/net/fec.c index 9a25e1e0a2e0..14eb6604a7f5 100644 --- a/drivers/net/fec.c +++ b/drivers/net/fec.c | |||
@@ -1170,7 +1170,6 @@ static int fec_enet_init(struct net_device *dev) | |||
1170 | 1170 | ||
1171 | spin_lock_init(&fep->hw_lock); | 1171 | spin_lock_init(&fep->hw_lock); |
1172 | 1172 | ||
1173 | fep->hwp = (void __iomem *)dev->base_addr; | ||
1174 | fep->netdev = dev; | 1173 | fep->netdev = dev; |
1175 | 1174 | ||
1176 | /* Get the Ethernet address */ | 1175 | /* Get the Ethernet address */ |
@@ -1387,10 +1386,10 @@ fec_probe(struct platform_device *pdev) | |||
1387 | /* setup board info structure */ | 1386 | /* setup board info structure */ |
1388 | fep = netdev_priv(ndev); | 1387 | fep = netdev_priv(ndev); |
1389 | 1388 | ||
1390 | ndev->base_addr = (unsigned long)ioremap(r->start, resource_size(r)); | 1389 | fep->hwp = ioremap(r->start, resource_size(r)); |
1391 | fep->pdev = pdev; | 1390 | fep->pdev = pdev; |
1392 | 1391 | ||
1393 | if (!ndev->base_addr) { | 1392 | if (!fep->hwp) { |
1394 | ret = -ENOMEM; | 1393 | ret = -ENOMEM; |
1395 | goto failed_ioremap; | 1394 | goto failed_ioremap; |
1396 | } | 1395 | } |
@@ -1453,7 +1452,7 @@ failed_clk: | |||
1453 | free_irq(irq, ndev); | 1452 | free_irq(irq, ndev); |
1454 | } | 1453 | } |
1455 | failed_irq: | 1454 | failed_irq: |
1456 | iounmap((void __iomem *)ndev->base_addr); | 1455 | iounmap(fep->hwp); |
1457 | failed_ioremap: | 1456 | failed_ioremap: |
1458 | free_netdev(ndev); | 1457 | free_netdev(ndev); |
1459 | failed_alloc_etherdev: | 1458 | failed_alloc_etherdev: |
@@ -1475,7 +1474,7 @@ fec_drv_remove(struct platform_device *pdev) | |||
1475 | fec_enet_mii_remove(fep); | 1474 | fec_enet_mii_remove(fep); |
1476 | clk_disable(fep->clk); | 1475 | clk_disable(fep->clk); |
1477 | clk_put(fep->clk); | 1476 | clk_put(fep->clk); |
1478 | iounmap((void __iomem *)ndev->base_addr); | 1477 | iounmap(fep->hwp); |
1479 | unregister_netdev(ndev); | 1478 | unregister_netdev(ndev); |
1480 | free_netdev(ndev); | 1479 | free_netdev(ndev); |
1481 | 1480 | ||