net: ethernet: remove unnecessary platform_set_drvdata()
The driver core clears the driver data to NULL after device_release
or on probe failure, since commit 0998d06310
(device-core: Ensure drvdata = NULL when no driver is bound).
Thus, it is not needed to manually clear the device driver data to NULL.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Roland Stigge <stigge@antcom.de>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Tested-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
3acfeac351
commit
dfd93c977d
@ -849,7 +849,6 @@ static int ne_drv_remove(struct platform_device *pdev)
|
|||||||
free_irq(dev->irq, dev);
|
free_irq(dev->irq, dev);
|
||||||
release_region(dev->base_addr, NE_IO_EXTENT);
|
release_region(dev->base_addr, NE_IO_EXTENT);
|
||||||
free_netdev(dev);
|
free_netdev(dev);
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1719,7 +1719,6 @@ out_err_mii_probe:
|
|||||||
mdiobus_unregister(lp->mii_bus);
|
mdiobus_unregister(lp->mii_bus);
|
||||||
mdiobus_free(lp->mii_bus);
|
mdiobus_free(lp->mii_bus);
|
||||||
out_err_probe_mac:
|
out_err_probe_mac:
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
free_netdev(ndev);
|
free_netdev(ndev);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
@ -1732,8 +1731,6 @@ static int bfin_mac_remove(struct platform_device *pdev)
|
|||||||
|
|
||||||
bfin_phc_release(lp);
|
bfin_phc_release(lp);
|
||||||
|
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
|
|
||||||
lp->mii_bus->priv = NULL;
|
lp->mii_bus->priv = NULL;
|
||||||
|
|
||||||
unregister_netdev(ndev);
|
unregister_netdev(ndev);
|
||||||
@ -1868,7 +1865,6 @@ static int bfin_mii_bus_remove(struct platform_device *pdev)
|
|||||||
struct bfin_mii_bus_platform_data *mii_bus_pd =
|
struct bfin_mii_bus_platform_data *mii_bus_pd =
|
||||||
dev_get_platdata(&pdev->dev);
|
dev_get_platdata(&pdev->dev);
|
||||||
|
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
mdiobus_unregister(miibus);
|
mdiobus_unregister(miibus);
|
||||||
kfree(miibus->irq);
|
kfree(miibus->irq);
|
||||||
mdiobus_free(miibus);
|
mdiobus_free(miibus);
|
||||||
|
@ -1301,8 +1301,6 @@ static int au1000_remove(struct platform_device *pdev)
|
|||||||
int i;
|
int i;
|
||||||
struct resource *base, *macen;
|
struct resource *base, *macen;
|
||||||
|
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
|
|
||||||
unregister_netdev(dev);
|
unregister_netdev(dev);
|
||||||
mdiobus_unregister(aup->mii_bus);
|
mdiobus_unregister(aup->mii_bus);
|
||||||
mdiobus_free(aup->mii_bus);
|
mdiobus_free(aup->mii_bus);
|
||||||
|
@ -1847,7 +1847,6 @@ static int bcm_enet_remove(struct platform_device *pdev)
|
|||||||
clk_disable_unprepare(priv->mac_clk);
|
clk_disable_unprepare(priv->mac_clk);
|
||||||
clk_put(priv->mac_clk);
|
clk_put(priv->mac_clk);
|
||||||
|
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
free_netdev(dev);
|
free_netdev(dev);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -435,7 +435,6 @@ static int at91ether_remove(struct platform_device *pdev)
|
|||||||
unregister_netdev(dev);
|
unregister_netdev(dev);
|
||||||
clk_disable(lp->pclk);
|
clk_disable(lp->pclk);
|
||||||
free_netdev(dev);
|
free_netdev(dev);
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1649,7 +1649,6 @@ err_out_put_pclk:
|
|||||||
err_out_free_dev:
|
err_out_free_dev:
|
||||||
free_netdev(dev);
|
free_netdev(dev);
|
||||||
err_out:
|
err_out:
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1675,7 +1674,6 @@ static int __exit macb_remove(struct platform_device *pdev)
|
|||||||
clk_disable_unprepare(bp->pclk);
|
clk_disable_unprepare(bp->pclk);
|
||||||
clk_put(bp->pclk);
|
clk_put(bp->pclk);
|
||||||
free_netdev(dev);
|
free_netdev(dev);
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1790,7 +1790,6 @@ err_io:
|
|||||||
free_netdev(ndev);
|
free_netdev(ndev);
|
||||||
err_alloc:
|
err_alloc:
|
||||||
release_mem_region(res->start, resource_size(res));
|
release_mem_region(res->start, resource_size(res));
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1813,7 +1812,6 @@ static int xgmac_remove(struct platform_device *pdev)
|
|||||||
free_irq(ndev->irq, ndev);
|
free_irq(ndev->irq, ndev);
|
||||||
free_irq(priv->pmt_irq, ndev);
|
free_irq(priv->pmt_irq, ndev);
|
||||||
|
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
unregister_netdev(ndev);
|
unregister_netdev(ndev);
|
||||||
netif_napi_del(&priv->napi);
|
netif_napi_del(&priv->napi);
|
||||||
|
|
||||||
|
@ -783,7 +783,6 @@ static int ep93xx_eth_remove(struct platform_device *pdev)
|
|||||||
dev = platform_get_drvdata(pdev);
|
dev = platform_get_drvdata(pdev);
|
||||||
if (dev == NULL)
|
if (dev == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
|
|
||||||
ep = netdev_priv(dev);
|
ep = netdev_priv(dev);
|
||||||
|
|
||||||
|
@ -1699,8 +1699,6 @@ dm9000_drv_remove(struct platform_device *pdev)
|
|||||||
{
|
{
|
||||||
struct net_device *ndev = platform_get_drvdata(pdev);
|
struct net_device *ndev = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
|
|
||||||
unregister_netdev(ndev);
|
unregister_netdev(ndev);
|
||||||
dm9000_release_board(pdev, netdev_priv(ndev));
|
dm9000_release_board(pdev, netdev_priv(ndev));
|
||||||
free_netdev(ndev); /* free device structure */
|
free_netdev(ndev); /* free device structure */
|
||||||
|
@ -1147,8 +1147,6 @@ static int ethoc_remove(struct platform_device *pdev)
|
|||||||
struct net_device *netdev = platform_get_drvdata(pdev);
|
struct net_device *netdev = platform_get_drvdata(pdev);
|
||||||
struct ethoc *priv = netdev_priv(netdev);
|
struct ethoc *priv = netdev_priv(netdev);
|
||||||
|
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
|
|
||||||
if (netdev) {
|
if (netdev) {
|
||||||
netif_napi_del(&priv->napi);
|
netif_napi_del(&priv->napi);
|
||||||
phy_disconnect(priv->phy);
|
phy_disconnect(priv->phy);
|
||||||
|
@ -1311,7 +1311,6 @@ err_ioremap:
|
|||||||
release_resource(priv->res);
|
release_resource(priv->res);
|
||||||
err_req_mem:
|
err_req_mem:
|
||||||
netif_napi_del(&priv->napi);
|
netif_napi_del(&priv->napi);
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
free_netdev(netdev);
|
free_netdev(netdev);
|
||||||
err_alloc_etherdev:
|
err_alloc_etherdev:
|
||||||
return err;
|
return err;
|
||||||
@ -1335,7 +1334,6 @@ static int __exit ftgmac100_remove(struct platform_device *pdev)
|
|||||||
release_resource(priv->res);
|
release_resource(priv->res);
|
||||||
|
|
||||||
netif_napi_del(&priv->napi);
|
netif_napi_del(&priv->napi);
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
free_netdev(netdev);
|
free_netdev(netdev);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1149,7 +1149,6 @@ err_ioremap:
|
|||||||
release_resource(priv->res);
|
release_resource(priv->res);
|
||||||
err_req_mem:
|
err_req_mem:
|
||||||
netif_napi_del(&priv->napi);
|
netif_napi_del(&priv->napi);
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
free_netdev(netdev);
|
free_netdev(netdev);
|
||||||
err_alloc_etherdev:
|
err_alloc_etherdev:
|
||||||
return err;
|
return err;
|
||||||
@ -1169,7 +1168,6 @@ static int __exit ftmac100_remove(struct platform_device *pdev)
|
|||||||
release_resource(priv->res);
|
release_resource(priv->res);
|
||||||
|
|
||||||
netif_napi_del(&priv->napi);
|
netif_napi_del(&priv->napi);
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
free_netdev(netdev);
|
free_netdev(netdev);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -2024,8 +2024,6 @@ fec_drv_remove(struct platform_device *pdev)
|
|||||||
clk_disable_unprepare(fep->clk_ipg);
|
clk_disable_unprepare(fep->clk_ipg);
|
||||||
free_netdev(ndev);
|
free_netdev(ndev);
|
||||||
|
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1211,7 +1211,6 @@ static int korina_remove(struct platform_device *pdev)
|
|||||||
iounmap(lp->rx_dma_regs);
|
iounmap(lp->rx_dma_regs);
|
||||||
iounmap(lp->tx_dma_regs);
|
iounmap(lp->tx_dma_regs);
|
||||||
|
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
unregister_netdev(bif->dev);
|
unregister_netdev(bif->dev);
|
||||||
free_netdev(bif->dev);
|
free_netdev(bif->dev);
|
||||||
|
|
||||||
|
@ -2813,8 +2813,6 @@ static int mv643xx_eth_remove(struct platform_device *pdev)
|
|||||||
|
|
||||||
free_netdev(mp->dev);
|
free_netdev(mp->dev);
|
||||||
|
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2804,8 +2804,6 @@ static int mvneta_remove(struct platform_device *pdev)
|
|||||||
irq_dispose_mapping(dev->irq);
|
irq_dispose_mapping(dev->irq);
|
||||||
free_netdev(dev);
|
free_netdev(dev);
|
||||||
|
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1602,7 +1602,6 @@ static int pxa168_eth_remove(struct platform_device *pdev)
|
|||||||
unregister_netdev(dev);
|
unregister_netdev(dev);
|
||||||
cancel_work_sync(&pep->tx_timeout_task);
|
cancel_work_sync(&pep->tx_timeout_task);
|
||||||
free_netdev(dev);
|
free_netdev(dev);
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1600,7 +1600,6 @@ ks8695_drv_remove(struct platform_device *pdev)
|
|||||||
struct net_device *ndev = platform_get_drvdata(pdev);
|
struct net_device *ndev = platform_get_drvdata(pdev);
|
||||||
struct ks8695_priv *ksp = netdev_priv(ndev);
|
struct ks8695_priv *ksp = netdev_priv(ndev);
|
||||||
|
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
netif_napi_del(&ksp->napi);
|
netif_napi_del(&ksp->napi);
|
||||||
|
|
||||||
unregister_netdev(ndev);
|
unregister_netdev(ndev);
|
||||||
|
@ -1250,7 +1250,6 @@ static int ks8842_remove(struct platform_device *pdev)
|
|||||||
iounmap(adapter->hw_addr);
|
iounmap(adapter->hw_addr);
|
||||||
free_netdev(netdev);
|
free_netdev(netdev);
|
||||||
release_mem_region(iomem->start, resource_size(iomem));
|
release_mem_region(iomem->start, resource_size(iomem));
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1671,7 +1671,6 @@ static int ks8851_remove(struct platform_device *pdev)
|
|||||||
iounmap(ks->hw_addr);
|
iounmap(ks->hw_addr);
|
||||||
free_netdev(netdev);
|
free_netdev(netdev);
|
||||||
release_mem_region(iomem->start, resource_size(iomem));
|
release_mem_region(iomem->start, resource_size(iomem));
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -422,7 +422,6 @@ exit_free_pfifo:
|
|||||||
exit_free_xc:
|
exit_free_xc:
|
||||||
free_xc(priv->xc);
|
free_xc(priv->xc);
|
||||||
exit_free_netdev:
|
exit_free_netdev:
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
free_netdev(ndev);
|
free_netdev(ndev);
|
||||||
exit:
|
exit:
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -1051,7 +1051,6 @@ failed_put_clk:
|
|||||||
clk_put(ether->clk);
|
clk_put(ether->clk);
|
||||||
failed_free_rxirq:
|
failed_free_rxirq:
|
||||||
free_irq(ether->rxirq, pdev);
|
free_irq(ether->rxirq, pdev);
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
failed_free_txirq:
|
failed_free_txirq:
|
||||||
free_irq(ether->txirq, pdev);
|
free_irq(ether->txirq, pdev);
|
||||||
failed_free_io:
|
failed_free_io:
|
||||||
@ -1080,7 +1079,6 @@ static int w90p910_ether_remove(struct platform_device *pdev)
|
|||||||
free_irq(ether->rxirq, dev);
|
free_irq(ether->rxirq, dev);
|
||||||
|
|
||||||
del_timer_sync(ðer->check_timer);
|
del_timer_sync(ðer->check_timer);
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
|
|
||||||
free_netdev(dev);
|
free_netdev(dev);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1483,7 +1483,6 @@ static int lpc_eth_drv_probe(struct platform_device *pdev)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_out_unregister_netdev:
|
err_out_unregister_netdev:
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
unregister_netdev(ndev);
|
unregister_netdev(ndev);
|
||||||
err_out_dma_unmap:
|
err_out_dma_unmap:
|
||||||
if (!use_iram_for_net(&pldat->pdev->dev) ||
|
if (!use_iram_for_net(&pldat->pdev->dev) ||
|
||||||
@ -1511,7 +1510,6 @@ static int lpc_eth_drv_remove(struct platform_device *pdev)
|
|||||||
struct netdata_local *pldat = netdev_priv(ndev);
|
struct netdata_local *pldat = netdev_priv(ndev);
|
||||||
|
|
||||||
unregister_netdev(ndev);
|
unregister_netdev(ndev);
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
|
|
||||||
if (!use_iram_for_net(&pldat->pdev->dev) ||
|
if (!use_iram_for_net(&pldat->pdev->dev) ||
|
||||||
pldat->dma_buff_size > lpc32xx_return_iram_size())
|
pldat->dma_buff_size > lpc32xx_return_iram_size())
|
||||||
|
@ -2803,7 +2803,6 @@ static int sh_eth_drv_remove(struct platform_device *pdev)
|
|||||||
unregister_netdev(ndev);
|
unregister_netdev(ndev);
|
||||||
pm_runtime_disable(&pdev->dev);
|
pm_runtime_disable(&pdev->dev);
|
||||||
free_netdev(ndev);
|
free_netdev(ndev);
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1040,7 +1040,6 @@ static int s6gmac_remove(struct platform_device *pdev)
|
|||||||
unregister_netdev(dev);
|
unregister_netdev(dev);
|
||||||
free_irq(dev->irq, dev);
|
free_irq(dev->irq, dev);
|
||||||
free_netdev(dev);
|
free_netdev(dev);
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -818,7 +818,6 @@ static int __exit sgiseeq_remove(struct platform_device *pdev)
|
|||||||
dma_free_noncoherent(&pdev->dev, sizeof(*sp->srings), sp->srings,
|
dma_free_noncoherent(&pdev->dev, sizeof(*sp->srings), sp->srings,
|
||||||
sp->srings_dma);
|
sp->srings_dma);
|
||||||
free_netdev(dev);
|
free_netdev(dev);
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -863,7 +863,6 @@ static int __exit meth_remove(struct platform_device *pdev)
|
|||||||
|
|
||||||
unregister_netdev(dev);
|
unregister_netdev(dev);
|
||||||
free_netdev(dev);
|
free_netdev(dev);
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -2087,7 +2087,6 @@ static int smc911x_drv_probe(struct platform_device *pdev)
|
|||||||
ndev->base_addr = res->start;
|
ndev->base_addr = res->start;
|
||||||
ret = smc911x_probe(ndev);
|
ret = smc911x_probe(ndev);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
iounmap(addr);
|
iounmap(addr);
|
||||||
release_both:
|
release_both:
|
||||||
free_netdev(ndev);
|
free_netdev(ndev);
|
||||||
@ -2113,7 +2112,6 @@ static int smc911x_drv_remove(struct platform_device *pdev)
|
|||||||
struct resource *res;
|
struct resource *res;
|
||||||
|
|
||||||
DBG(SMC_DEBUG_FUNC, "--> %s\n", __func__);
|
DBG(SMC_DEBUG_FUNC, "--> %s\n", __func__);
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
|
|
||||||
unregister_netdev(ndev);
|
unregister_netdev(ndev);
|
||||||
|
|
||||||
|
@ -2299,7 +2299,6 @@ static int smc_drv_probe(struct platform_device *pdev)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
out_iounmap:
|
out_iounmap:
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
iounmap(addr);
|
iounmap(addr);
|
||||||
out_release_attrib:
|
out_release_attrib:
|
||||||
smc_release_attrib(pdev, ndev);
|
smc_release_attrib(pdev, ndev);
|
||||||
@ -2319,8 +2318,6 @@ static int smc_drv_remove(struct platform_device *pdev)
|
|||||||
struct smc_local *lp = netdev_priv(ndev);
|
struct smc_local *lp = netdev_priv(ndev);
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
|
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
|
|
||||||
unregister_netdev(ndev);
|
unregister_netdev(ndev);
|
||||||
|
|
||||||
free_irq(ndev->irq, ndev);
|
free_irq(ndev->irq, ndev);
|
||||||
|
@ -2284,7 +2284,6 @@ static int smsc911x_drv_remove(struct platform_device *pdev)
|
|||||||
mdiobus_unregister(pdata->mii_bus);
|
mdiobus_unregister(pdata->mii_bus);
|
||||||
mdiobus_free(pdata->mii_bus);
|
mdiobus_free(pdata->mii_bus);
|
||||||
|
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
unregister_netdev(dev);
|
unregister_netdev(dev);
|
||||||
free_irq(dev->irq, dev);
|
free_irq(dev->irq, dev);
|
||||||
res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
|
res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
|
||||||
@ -2539,7 +2538,6 @@ out_disable_resources:
|
|||||||
out_enable_resources_fail:
|
out_enable_resources_fail:
|
||||||
smsc911x_free_resources(pdev);
|
smsc911x_free_resources(pdev);
|
||||||
out_request_resources_fail:
|
out_request_resources_fail:
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
iounmap(pdata->ioaddr);
|
iounmap(pdata->ioaddr);
|
||||||
free_netdev(dev);
|
free_netdev(dev);
|
||||||
out_release_io_1:
|
out_release_io_1:
|
||||||
|
@ -171,8 +171,6 @@ static int stmmac_pltfr_remove(struct platform_device *pdev)
|
|||||||
if (priv->plat->exit)
|
if (priv->plat->exit)
|
||||||
priv->plat->exit(pdev);
|
priv->plat->exit(pdev);
|
||||||
|
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1940,7 +1940,6 @@ static int cpsw_remove(struct platform_device *pdev)
|
|||||||
struct cpsw_priv *priv = netdev_priv(ndev);
|
struct cpsw_priv *priv = netdev_priv(ndev);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
if (priv->data.dual_emac)
|
if (priv->data.dual_emac)
|
||||||
unregister_netdev(cpsw_get_slave_ndev(priv, 1));
|
unregister_netdev(cpsw_get_slave_ndev(priv, 1));
|
||||||
unregister_netdev(ndev);
|
unregister_netdev(ndev);
|
||||||
|
@ -2037,8 +2037,6 @@ static int davinci_emac_remove(struct platform_device *pdev)
|
|||||||
|
|
||||||
dev_notice(&ndev->dev, "DaVinci EMAC: davinci_emac_remove()\n");
|
dev_notice(&ndev->dev, "DaVinci EMAC: davinci_emac_remove()\n");
|
||||||
|
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
|
|
||||||
if (priv->txchan)
|
if (priv->txchan)
|
||||||
cpdma_chan_destroy(priv->txchan);
|
cpdma_chan_destroy(priv->txchan);
|
||||||
if (priv->rxchan)
|
if (priv->rxchan)
|
||||||
|
@ -1682,7 +1682,6 @@ static int tsi108_ether_remove(struct platform_device *pdev)
|
|||||||
|
|
||||||
unregister_netdev(dev);
|
unregister_netdev(dev);
|
||||||
tsi108_stop_ethernet(dev);
|
tsi108_stop_ethernet(dev);
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
iounmap(priv->regs);
|
iounmap(priv->regs);
|
||||||
iounmap(priv->phyregs);
|
iounmap(priv->phyregs);
|
||||||
free_netdev(dev);
|
free_netdev(dev);
|
||||||
|
@ -734,7 +734,6 @@ err_hw_probe:
|
|||||||
unregister_netdev(ndev);
|
unregister_netdev(ndev);
|
||||||
err_register:
|
err_register:
|
||||||
free_netdev(ndev);
|
free_netdev(ndev);
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -750,7 +749,6 @@ static int w5100_remove(struct platform_device *pdev)
|
|||||||
|
|
||||||
unregister_netdev(ndev);
|
unregister_netdev(ndev);
|
||||||
free_netdev(ndev);
|
free_netdev(ndev);
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -646,7 +646,6 @@ err_hw_probe:
|
|||||||
unregister_netdev(ndev);
|
unregister_netdev(ndev);
|
||||||
err_register:
|
err_register:
|
||||||
free_netdev(ndev);
|
free_netdev(ndev);
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -662,7 +661,6 @@ static int w5300_remove(struct platform_device *pdev)
|
|||||||
|
|
||||||
unregister_netdev(ndev);
|
unregister_netdev(ndev);
|
||||||
free_netdev(ndev);
|
free_netdev(ndev);
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1472,7 +1472,6 @@ err_phy_dis:
|
|||||||
phy_disconnect(port->phydev);
|
phy_disconnect(port->phydev);
|
||||||
err_free_mem:
|
err_free_mem:
|
||||||
npe_port_tab[NPE_ID(port->id)] = NULL;
|
npe_port_tab[NPE_ID(port->id)] = NULL;
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
release_resource(port->mem_res);
|
release_resource(port->mem_res);
|
||||||
err_npe_rel:
|
err_npe_rel:
|
||||||
npe_release(port->npe);
|
npe_release(port->npe);
|
||||||
@ -1489,7 +1488,6 @@ static int eth_remove_one(struct platform_device *pdev)
|
|||||||
unregister_netdev(dev);
|
unregister_netdev(dev);
|
||||||
phy_disconnect(port->phydev);
|
phy_disconnect(port->phydev);
|
||||||
npe_port_tab[NPE_ID(port->id)] = NULL;
|
npe_port_tab[NPE_ID(port->id)] = NULL;
|
||||||
platform_set_drvdata(pdev, NULL);
|
|
||||||
npe_release(port->npe);
|
npe_release(port->npe);
|
||||||
release_resource(port->mem_res);
|
release_resource(port->mem_res);
|
||||||
free_netdev(dev);
|
free_netdev(dev);
|
||||||
|
Reference in New Issue
Block a user