Merge branch 'net-platform-remove-void'

Uwe Kleine-König says:

====================
net: ethernet: Convert to platform remove callback returning void

this series convert nearly all platform drivers below
drivers/net/ethernet to use remove_new. The motivation is to get rid of
an integer return code that is (mostly) ignored by the platform driver
core and error prone on the driver side.

There are 3 drivers I didn't convert (yet):

 drivers/net/ethernet/ti/cpsw.c
 drivers/net/ethernet/ti/cpsw_new.c
 drivers/net/ethernet/ti/am65-cpsw-nuss.c

These are a bit more complicated because they don't always return 0 in
.remove(). Unless someone is quicker than me, I'll address them in
separate patches at a later time.

See commit 5c5a7680e6 ("platform: Provide a remove callback that
returns no value") for an extended explanation and the eventual goal.

There are no interdependencies between the patches. As there are still
quite a few drivers to convert, I'm happy about every patch that makes
it in. So even if there is a merge conflict with one patch until you
apply, please apply the remainder of this series anyhow.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller 2023-09-20 09:06:41 +01:00
commit 6f0b985d35
101 changed files with 213 additions and 399 deletions

View File

@ -811,7 +811,7 @@ static int ax_init_dev(struct net_device *dev)
return ret;
}
static int ax_remove(struct platform_device *pdev)
static void ax_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
struct ei_device *ei_local = netdev_priv(dev);
@ -832,8 +832,6 @@ static int ax_remove(struct platform_device *pdev)
platform_set_drvdata(pdev, NULL);
free_netdev(dev);
return 0;
}
/*
@ -1011,7 +1009,7 @@ static struct platform_driver axdrv = {
.name = "ax88796",
},
.probe = ax_probe,
.remove = ax_remove,
.remove_new = ax_remove,
.suspend = ax_suspend,
.resume = ax_resume,
};

View File

@ -441,7 +441,7 @@ static int mcf8390_probe(struct platform_device *pdev)
return 0;
}
static int mcf8390_remove(struct platform_device *pdev)
static void mcf8390_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
struct resource *mem;
@ -450,7 +450,6 @@ static int mcf8390_remove(struct platform_device *pdev)
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
release_mem_region(mem->start, resource_size(mem));
free_netdev(dev);
return 0;
}
static struct platform_driver mcf8390_drv = {
@ -458,7 +457,7 @@ static struct platform_driver mcf8390_drv = {
.name = "mcf8390",
},
.probe = mcf8390_probe,
.remove = mcf8390_remove,
.remove_new = mcf8390_remove,
};
module_platform_driver(mcf8390_drv);

View File

@ -823,7 +823,7 @@ static int __init ne_drv_probe(struct platform_device *pdev)
return 0;
}
static int ne_drv_remove(struct platform_device *pdev)
static void ne_drv_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
@ -842,7 +842,6 @@ static int ne_drv_remove(struct platform_device *pdev)
release_region(dev->base_addr, NE_IO_EXTENT);
free_netdev(dev);
}
return 0;
}
/* Remove unused devices or all if true. */
@ -895,7 +894,7 @@ static int ne_drv_resume(struct platform_device *pdev)
#endif
static struct platform_driver ne_driver = {
.remove = ne_drv_remove,
.remove_new = ne_drv_remove,
.suspend = ne_drv_suspend,
.resume = ne_drv_resume,
.driver = {

View File

@ -1582,15 +1582,13 @@ static int owl_emac_probe(struct platform_device *pdev)
return 0;
}
static int owl_emac_remove(struct platform_device *pdev)
static void owl_emac_remove(struct platform_device *pdev)
{
struct owl_emac_priv *priv = platform_get_drvdata(pdev);
netif_napi_del(&priv->napi);
phy_disconnect(priv->netdev->phydev);
cancel_work_sync(&priv->mac_reset_task);
return 0;
}
static const struct of_device_id owl_emac_of_match[] = {
@ -1609,7 +1607,7 @@ static struct platform_driver owl_emac_driver = {
.pm = &owl_emac_pm_ops,
},
.probe = owl_emac_probe,
.remove = owl_emac_remove,
.remove_new = owl_emac_remove,
};
module_platform_driver(owl_emac_driver);

View File

@ -1525,7 +1525,7 @@ static int greth_of_probe(struct platform_device *ofdev)
return err;
}
static int greth_of_remove(struct platform_device *of_dev)
static void greth_of_remove(struct platform_device *of_dev)
{
struct net_device *ndev = platform_get_drvdata(of_dev);
struct greth_private *greth = netdev_priv(ndev);
@ -1544,8 +1544,6 @@ static int greth_of_remove(struct platform_device *of_dev)
of_iounmap(&of_dev->resource[0], greth->regs, resource_size(&of_dev->resource[0]));
free_netdev(ndev);
return 0;
}
static const struct of_device_id greth_of_match[] = {
@ -1566,7 +1564,7 @@ static struct platform_driver greth_of_driver = {
.of_match_table = greth_of_match,
},
.probe = greth_of_probe,
.remove = greth_of_remove,
.remove_new = greth_of_remove,
};
module_platform_driver(greth_of_driver);

View File

@ -1083,7 +1083,7 @@ static int emac_probe(struct platform_device *pdev)
return ret;
}
static int emac_remove(struct platform_device *pdev)
static void emac_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct emac_board_info *db = netdev_priv(ndev);
@ -1101,7 +1101,6 @@ static int emac_remove(struct platform_device *pdev)
free_netdev(ndev);
dev_dbg(&pdev->dev, "released and freed device\n");
return 0;
}
static int emac_suspend(struct platform_device *dev, pm_message_t state)
@ -1143,7 +1142,7 @@ static struct platform_driver emac_driver = {
.of_match_table = emac_of_match,
},
.probe = emac_probe,
.remove = emac_remove,
.remove_new = emac_remove,
.suspend = emac_suspend,
.resume = emac_resume,
};

View File

@ -1464,7 +1464,7 @@ static int altera_tse_probe(struct platform_device *pdev)
/* Remove Altera TSE MAC device
*/
static int altera_tse_remove(struct platform_device *pdev)
static void altera_tse_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct altera_tse_private *priv = netdev_priv(ndev);
@ -1476,8 +1476,6 @@ static int altera_tse_remove(struct platform_device *pdev)
lynx_pcs_destroy(priv->pcs);
free_netdev(ndev);
return 0;
}
static const struct altera_dmaops altera_dtype_sgdma = {
@ -1528,7 +1526,7 @@ MODULE_DEVICE_TABLE(of, altera_tse_ids);
static struct platform_driver altera_tse_driver = {
.probe = altera_tse_probe,
.remove = altera_tse_remove,
.remove_new = altera_tse_remove,
.suspend = NULL,
.resume = NULL,
.driver = {

View File

@ -1323,7 +1323,7 @@ static int au1000_probe(struct platform_device *pdev)
return err;
}
static int au1000_remove(struct platform_device *pdev)
static void au1000_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
struct au1000_private *aup = netdev_priv(dev);
@ -1359,13 +1359,11 @@ static int au1000_remove(struct platform_device *pdev)
release_mem_region(macen->start, resource_size(macen));
free_netdev(dev);
return 0;
}
static struct platform_driver au1000_eth_driver = {
.probe = au1000_probe,
.remove = au1000_remove,
.remove_new = au1000_remove,
.driver = {
.name = "au1000-eth",
},

View File

@ -1487,7 +1487,7 @@ static int sunlance_sbus_probe(struct platform_device *op)
return err;
}
static int sunlance_sbus_remove(struct platform_device *op)
static void sunlance_sbus_remove(struct platform_device *op)
{
struct lance_private *lp = platform_get_drvdata(op);
struct net_device *net_dev = lp->dev;
@ -1497,8 +1497,6 @@ static int sunlance_sbus_remove(struct platform_device *op)
lance_free_hwresources(lp);
free_netdev(net_dev);
return 0;
}
static const struct of_device_id sunlance_sbus_match[] = {
@ -1516,7 +1514,7 @@ static struct platform_driver sunlance_sbus_driver = {
.of_match_table = sunlance_sbus_match,
},
.probe = sunlance_sbus_probe,
.remove = sunlance_sbus_remove,
.remove_new = sunlance_sbus_remove,
};
module_platform_driver(sunlance_sbus_driver);

View File

@ -512,7 +512,7 @@ static int xgbe_platform_probe(struct platform_device *pdev)
return ret;
}
static int xgbe_platform_remove(struct platform_device *pdev)
static void xgbe_platform_remove(struct platform_device *pdev)
{
struct xgbe_prv_data *pdata = platform_get_drvdata(pdev);
@ -521,8 +521,6 @@ static int xgbe_platform_remove(struct platform_device *pdev)
platform_device_put(pdata->phy_platdev);
xgbe_free_pdata(pdata);
return 0;
}
#ifdef CONFIG_PM_SLEEP
@ -615,7 +613,7 @@ static struct platform_driver xgbe_driver = {
.pm = &xgbe_platform_pm_ops,
},
.probe = xgbe_platform_probe,
.remove = xgbe_platform_remove,
.remove_new = xgbe_platform_remove,
};
int xgbe_platform_init(void)

View File

@ -690,7 +690,7 @@ static int xge_probe(struct platform_device *pdev)
return ret;
}
static int xge_remove(struct platform_device *pdev)
static void xge_remove(struct platform_device *pdev)
{
struct xge_pdata *pdata;
struct net_device *ndev;
@ -706,8 +706,6 @@ static int xge_remove(struct platform_device *pdev)
xge_mdio_remove(ndev);
unregister_netdev(ndev);
free_netdev(ndev);
return 0;
}
static void xge_shutdown(struct platform_device *pdev)
@ -736,7 +734,7 @@ static struct platform_driver xge_driver = {
.acpi_match_table = ACPI_PTR(xge_acpi_match),
},
.probe = xge_probe,
.remove = xge_remove,
.remove_new = xge_remove,
.shutdown = xge_shutdown,
};
module_platform_driver(xge_driver);

View File

@ -2127,7 +2127,7 @@ static int xgene_enet_probe(struct platform_device *pdev)
return ret;
}
static int xgene_enet_remove(struct platform_device *pdev)
static void xgene_enet_remove(struct platform_device *pdev)
{
struct xgene_enet_pdata *pdata;
struct net_device *ndev;
@ -2149,8 +2149,6 @@ static int xgene_enet_remove(struct platform_device *pdev)
xgene_enet_delete_desc_rings(pdata);
pdata->port_ops->shutdown(pdata);
free_netdev(ndev);
return 0;
}
static void xgene_enet_shutdown(struct platform_device *pdev)
@ -2174,7 +2172,7 @@ static struct platform_driver xgene_enet_driver = {
.acpi_match_table = ACPI_PTR(xgene_enet_acpi_match),
},
.probe = xgene_enet_probe,
.remove = xgene_enet_remove,
.remove_new = xgene_enet_remove,
.shutdown = xgene_enet_shutdown,
};

View File

@ -739,7 +739,7 @@ MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Macintosh MACE ethernet driver");
MODULE_ALIAS("platform:macmace");
static int mac_mace_device_remove(struct platform_device *pdev)
static void mac_mace_device_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
struct mace_data *mp = netdev_priv(dev);
@ -755,13 +755,11 @@ static int mac_mace_device_remove(struct platform_device *pdev)
mp->tx_ring, mp->tx_ring_phys);
free_netdev(dev);
return 0;
}
static struct platform_driver mac_mace_driver = {
.probe = mace_probe,
.remove = mac_mace_device_remove,
.remove_new = mac_mace_device_remove,
.driver = {
.name = mac_mace_string,
},

View File

@ -58,14 +58,12 @@ static int emac_arc_probe(struct platform_device *pdev)
return err;
}
static int emac_arc_remove(struct platform_device *pdev)
static void emac_arc_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
arc_emac_remove(ndev);
free_netdev(ndev);
return 0;
}
static const struct of_device_id emac_arc_dt_ids[] = {
@ -76,7 +74,7 @@ MODULE_DEVICE_TABLE(of, emac_arc_dt_ids);
static struct platform_driver emac_arc_driver = {
.probe = emac_arc_probe,
.remove = emac_arc_remove,
.remove_new = emac_arc_remove,
.driver = {
.name = DRV_NAME,
.of_match_table = emac_arc_dt_ids,

View File

@ -244,7 +244,7 @@ static int emac_rockchip_probe(struct platform_device *pdev)
return err;
}
static int emac_rockchip_remove(struct platform_device *pdev)
static void emac_rockchip_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct rockchip_priv_data *priv = netdev_priv(ndev);
@ -260,12 +260,11 @@ static int emac_rockchip_remove(struct platform_device *pdev)
clk_disable_unprepare(priv->macclk);
free_netdev(ndev);
return 0;
}
static struct platform_driver emac_rockchip_driver = {
.probe = emac_rockchip_probe,
.remove = emac_rockchip_remove,
.remove_new = emac_rockchip_remove,
.driver = {
.name = DRV_NAME,
.of_match_table = emac_rockchip_dt_ids,

View File

@ -1968,21 +1968,19 @@ static int ag71xx_probe(struct platform_device *pdev)
return err;
}
static int ag71xx_remove(struct platform_device *pdev)
static void ag71xx_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct ag71xx *ag;
if (!ndev)
return 0;
return;
ag = netdev_priv(ndev);
unregister_netdev(ndev);
ag71xx_mdio_remove(ag);
clk_disable_unprepare(ag->clk_eth);
platform_set_drvdata(pdev, NULL);
return 0;
}
static const u32 ar71xx_fifo_ar7100[] = {
@ -2069,7 +2067,7 @@ static const struct of_device_id ag71xx_match[] = {
static struct platform_driver ag71xx_driver = {
.probe = ag71xx_probe,
.remove = ag71xx_remove,
.remove_new = ag71xx_remove,
.driver = {
.name = "ag71xx",
.of_match_table = ag71xx_match,

View File

@ -1344,17 +1344,15 @@ static int bcmasp_probe(struct platform_device *pdev)
return ret;
}
static int bcmasp_remove(struct platform_device *pdev)
static void bcmasp_remove(struct platform_device *pdev)
{
struct bcmasp_priv *priv = dev_get_drvdata(&pdev->dev);
if (!priv)
return 0;
return;
priv->destroy_wol(priv);
bcmasp_remove_intfs(priv);
return 0;
}
static void bcmasp_shutdown(struct platform_device *pdev)
@ -1428,7 +1426,7 @@ static SIMPLE_DEV_PM_OPS(bcmasp_pm_ops,
static struct platform_driver bcmasp_driver = {
.probe = bcmasp_probe,
.remove = bcmasp_remove,
.remove_new = bcmasp_remove,
.shutdown = bcmasp_shutdown,
.driver = {
.name = "brcm,asp-v2",

View File

@ -768,7 +768,7 @@ static int bcm4908_enet_probe(struct platform_device *pdev)
return err;
}
static int bcm4908_enet_remove(struct platform_device *pdev)
static void bcm4908_enet_remove(struct platform_device *pdev)
{
struct bcm4908_enet *enet = platform_get_drvdata(pdev);
@ -776,8 +776,6 @@ static int bcm4908_enet_remove(struct platform_device *pdev)
netif_napi_del(&enet->rx_ring.napi);
netif_napi_del(&enet->tx_ring.napi);
bcm4908_enet_dma_free(enet);
return 0;
}
static const struct of_device_id bcm4908_enet_of_match[] = {
@ -791,7 +789,7 @@ static struct platform_driver bcm4908_enet_driver = {
.of_match_table = bcm4908_enet_of_match,
},
.probe = bcm4908_enet_probe,
.remove = bcm4908_enet_remove,
.remove_new = bcm4908_enet_remove,
};
module_platform_driver(bcm4908_enet_driver);

View File

@ -1902,7 +1902,7 @@ static int bcm_enet_probe(struct platform_device *pdev)
/*
* exit func, stops hardware and unregisters netdevice
*/
static int bcm_enet_remove(struct platform_device *pdev)
static void bcm_enet_remove(struct platform_device *pdev)
{
struct bcm_enet_priv *priv;
struct net_device *dev;
@ -1932,12 +1932,11 @@ static int bcm_enet_remove(struct platform_device *pdev)
clk_disable_unprepare(priv->mac_clk);
free_netdev(dev);
return 0;
}
static struct platform_driver bcm63xx_enet_driver = {
.probe = bcm_enet_probe,
.remove = bcm_enet_remove,
.remove_new = bcm_enet_remove,
.driver = {
.name = "bcm63xx_enet",
},
@ -2739,7 +2738,7 @@ static int bcm_enetsw_probe(struct platform_device *pdev)
/* exit func, stops hardware and unregisters netdevice */
static int bcm_enetsw_remove(struct platform_device *pdev)
static void bcm_enetsw_remove(struct platform_device *pdev)
{
struct bcm_enet_priv *priv;
struct net_device *dev;
@ -2752,12 +2751,11 @@ static int bcm_enetsw_remove(struct platform_device *pdev)
clk_disable_unprepare(priv->mac_clk);
free_netdev(dev);
return 0;
}
static struct platform_driver bcm63xx_enetsw_driver = {
.probe = bcm_enetsw_probe,
.remove = bcm_enetsw_remove,
.remove_new = bcm_enetsw_remove,
.driver = {
.name = "bcm63xx_enetsw",
},

View File

@ -2648,7 +2648,7 @@ static int bcm_sysport_probe(struct platform_device *pdev)
return ret;
}
static int bcm_sysport_remove(struct platform_device *pdev)
static void bcm_sysport_remove(struct platform_device *pdev)
{
struct net_device *dev = dev_get_drvdata(&pdev->dev);
struct bcm_sysport_priv *priv = netdev_priv(dev);
@ -2663,8 +2663,6 @@ static int bcm_sysport_remove(struct platform_device *pdev)
of_phy_deregister_fixed_link(dn);
free_netdev(dev);
dev_set_drvdata(&pdev->dev, NULL);
return 0;
}
static int bcm_sysport_suspend_to_wol(struct bcm_sysport_priv *priv)
@ -2901,7 +2899,7 @@ static SIMPLE_DEV_PM_OPS(bcm_sysport_pm_ops,
static struct platform_driver bcm_sysport_driver = {
.probe = bcm_sysport_probe,
.remove = bcm_sysport_remove,
.remove_new = bcm_sysport_remove,
.driver = {
.name = "brcm-systemport",
.of_match_table = bcm_sysport_of_match,

View File

@ -246,13 +246,11 @@ static int bgmac_probe(struct platform_device *pdev)
return bgmac_enet_probe(bgmac);
}
static int bgmac_remove(struct platform_device *pdev)
static void bgmac_remove(struct platform_device *pdev)
{
struct bgmac *bgmac = platform_get_drvdata(pdev);
bgmac_enet_remove(bgmac);
return 0;
}
#ifdef CONFIG_PM
@ -296,7 +294,7 @@ static struct platform_driver bgmac_enet_driver = {
.pm = BGMAC_PM_OPS
},
.probe = bgmac_probe,
.remove = bgmac_remove,
.remove_new = bgmac_remove,
};
module_platform_driver(bgmac_enet_driver);

View File

@ -4164,7 +4164,7 @@ static int bcmgenet_probe(struct platform_device *pdev)
return err;
}
static int bcmgenet_remove(struct platform_device *pdev)
static void bcmgenet_remove(struct platform_device *pdev)
{
struct bcmgenet_priv *priv = dev_to_priv(&pdev->dev);
@ -4172,8 +4172,6 @@ static int bcmgenet_remove(struct platform_device *pdev)
unregister_netdev(priv->dev);
bcmgenet_mii_exit(priv->dev);
free_netdev(priv->dev);
return 0;
}
static void bcmgenet_shutdown(struct platform_device *pdev)
@ -4352,7 +4350,7 @@ MODULE_DEVICE_TABLE(acpi, genet_acpi_match);
static struct platform_driver bcmgenet_driver = {
.probe = bcmgenet_probe,
.remove = bcmgenet_remove,
.remove_new = bcmgenet_remove,
.shutdown = bcmgenet_shutdown,
.driver = {
.name = "bcmgenet",

View File

@ -2593,7 +2593,7 @@ static int sbmac_probe(struct platform_device *pldev)
return err;
}
static int sbmac_remove(struct platform_device *pldev)
static void sbmac_remove(struct platform_device *pldev)
{
struct net_device *dev = platform_get_drvdata(pldev);
struct sbmac_softc *sc = netdev_priv(dev);
@ -2604,13 +2604,11 @@ static int sbmac_remove(struct platform_device *pldev)
mdiobus_free(sc->mii_bus);
iounmap(sc->sbm_base);
free_netdev(dev);
return 0;
}
static struct platform_driver sbmac_driver = {
.probe = sbmac_probe,
.remove = sbmac_remove,
.remove_new = sbmac_remove,
.driver = {
.name = sbmac_string,
},

View File

@ -5156,7 +5156,7 @@ static int macb_probe(struct platform_device *pdev)
return err;
}
static int macb_remove(struct platform_device *pdev)
static void macb_remove(struct platform_device *pdev)
{
struct net_device *dev;
struct macb *bp;
@ -5181,8 +5181,6 @@ static int macb_remove(struct platform_device *pdev)
phylink_destroy(bp->phylink);
free_netdev(dev);
}
return 0;
}
static int __maybe_unused macb_suspend(struct device *dev)
@ -5398,7 +5396,7 @@ static const struct dev_pm_ops macb_pm_ops = {
static struct platform_driver macb_driver = {
.probe = macb_probe,
.remove = macb_remove,
.remove_new = macb_remove,
.driver = {
.name = "macb",
.of_match_table = of_match_ptr(macb_dt_ids),

View File

@ -1820,7 +1820,7 @@ static int xgmac_probe(struct platform_device *pdev)
* changes the link status, releases the DMA descriptor rings,
* unregisters the MDIO bus and unmaps the allocated memory.
*/
static int xgmac_remove(struct platform_device *pdev)
static void xgmac_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct xgmac_priv *priv = netdev_priv(ndev);
@ -1840,8 +1840,6 @@ static int xgmac_remove(struct platform_device *pdev)
release_mem_region(res->start, resource_size(res));
free_netdev(ndev);
return 0;
}
#ifdef CONFIG_PM_SLEEP
@ -1921,7 +1919,7 @@ static struct platform_driver xgmac_driver = {
.pm = &xgmac_pm_ops,
},
.probe = xgmac_probe,
.remove = xgmac_remove,
.remove_new = xgmac_remove,
};
module_platform_driver(xgmac_driver);

View File

@ -1521,7 +1521,7 @@ static int octeon_mgmt_probe(struct platform_device *pdev)
return result;
}
static int octeon_mgmt_remove(struct platform_device *pdev)
static void octeon_mgmt_remove(struct platform_device *pdev)
{
struct net_device *netdev = platform_get_drvdata(pdev);
struct octeon_mgmt *p = netdev_priv(netdev);
@ -1529,7 +1529,6 @@ static int octeon_mgmt_remove(struct platform_device *pdev)
unregister_netdev(netdev);
of_node_put(p->phy_np);
free_netdev(netdev);
return 0;
}
static const struct of_device_id octeon_mgmt_match[] = {
@ -1546,7 +1545,7 @@ static struct platform_driver octeon_mgmt_driver = {
.of_match_table = octeon_mgmt_match,
},
.probe = octeon_mgmt_probe,
.remove = octeon_mgmt_remove,
.remove_new = octeon_mgmt_remove,
};
module_platform_driver(octeon_mgmt_driver);

View File

@ -1879,7 +1879,7 @@ static int __init cs89x0_platform_probe(struct platform_device *pdev)
return err;
}
static int cs89x0_platform_remove(struct platform_device *pdev)
static void cs89x0_platform_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
@ -1889,7 +1889,6 @@ static int cs89x0_platform_remove(struct platform_device *pdev)
*/
unregister_netdev(dev);
free_netdev(dev);
return 0;
}
static const struct of_device_id __maybe_unused cs89x0_match[] = {
@ -1904,7 +1903,7 @@ static struct platform_driver cs89x0_driver = {
.name = DRV_NAME,
.of_match_table = of_match_ptr(cs89x0_match),
},
.remove = cs89x0_platform_remove,
.remove_new = cs89x0_platform_remove,
};
module_platform_driver_probe(cs89x0_driver, cs89x0_platform_probe);

View File

@ -757,7 +757,7 @@ static struct net_device *ep93xx_dev_alloc(struct ep93xx_eth_data *data)
}
static int ep93xx_eth_remove(struct platform_device *pdev)
static void ep93xx_eth_remove(struct platform_device *pdev)
{
struct net_device *dev;
struct ep93xx_priv *ep;
@ -765,7 +765,7 @@ static int ep93xx_eth_remove(struct platform_device *pdev)
dev = platform_get_drvdata(pdev);
if (dev == NULL)
return 0;
return;
ep = netdev_priv(dev);
@ -782,8 +782,6 @@ static int ep93xx_eth_remove(struct platform_device *pdev)
}
free_netdev(dev);
return 0;
}
static int ep93xx_eth_probe(struct platform_device *pdev)
@ -862,7 +860,7 @@ static int ep93xx_eth_probe(struct platform_device *pdev)
static struct platform_driver ep93xx_eth_driver = {
.probe = ep93xx_eth_probe,
.remove = ep93xx_eth_remove,
.remove_new = ep93xx_eth_remove,
.driver = {
.name = "ep93xx-eth",
},

View File

@ -556,19 +556,18 @@ static int set_mac_address(struct net_device *dev, void *addr)
MODULE_LICENSE("GPL");
static int mac89x0_device_remove(struct platform_device *pdev)
static void mac89x0_device_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
unregister_netdev(dev);
nubus_writew(0, dev->base_addr + ADD_PORT);
free_netdev(dev);
return 0;
}
static struct platform_driver mac89x0_platform_driver = {
.probe = mac89x0_device_probe,
.remove = mac89x0_device_remove,
.remove_new = mac89x0_device_remove,
.driver = {
.name = "mac89x0",
},

View File

@ -2518,13 +2518,11 @@ static int gemini_ethernet_port_probe(struct platform_device *pdev)
return ret;
}
static int gemini_ethernet_port_remove(struct platform_device *pdev)
static void gemini_ethernet_port_remove(struct platform_device *pdev)
{
struct gemini_ethernet_port *port = platform_get_drvdata(pdev);
gemini_port_remove(port);
return 0;
}
static const struct of_device_id gemini_ethernet_port_of_match[] = {
@ -2541,7 +2539,7 @@ static struct platform_driver gemini_ethernet_port_driver = {
.of_match_table = gemini_ethernet_port_of_match,
},
.probe = gemini_ethernet_port_probe,
.remove = gemini_ethernet_port_remove,
.remove_new = gemini_ethernet_port_remove,
};
static int gemini_ethernet_probe(struct platform_device *pdev)
@ -2583,14 +2581,12 @@ static int gemini_ethernet_probe(struct platform_device *pdev)
return devm_of_platform_populate(dev);
}
static int gemini_ethernet_remove(struct platform_device *pdev)
static void gemini_ethernet_remove(struct platform_device *pdev)
{
struct gemini_ethernet *geth = platform_get_drvdata(pdev);
geth_cleanup_freeq(geth);
geth->initialized = false;
return 0;
}
static const struct of_device_id gemini_ethernet_of_match[] = {
@ -2607,7 +2603,7 @@ static struct platform_driver gemini_ethernet_driver = {
.of_match_table = gemini_ethernet_of_match,
},
.probe = gemini_ethernet_probe,
.remove = gemini_ethernet_remove,
.remove_new = gemini_ethernet_remove,
};
static int __init gemini_ethernet_module_init(void)

View File

@ -1770,8 +1770,7 @@ static const struct dev_pm_ops dm9000_drv_pm_ops = {
.resume = dm9000_drv_resume,
};
static int
dm9000_drv_remove(struct platform_device *pdev)
static void dm9000_drv_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct board_info *dm = to_dm9000_board(ndev);
@ -1783,7 +1782,6 @@ dm9000_drv_remove(struct platform_device *pdev)
regulator_disable(dm->power_supply);
dev_dbg(&pdev->dev, "released and freed device\n");
return 0;
}
#ifdef CONFIG_OF
@ -1801,7 +1799,7 @@ static struct platform_driver dm9000_driver = {
.of_match_table = of_match_ptr(dm9000_of_matches),
},
.probe = dm9000_probe,
.remove = dm9000_drv_remove,
.remove_new = dm9000_drv_remove,
};
module_platform_driver(dm9000_driver);

View File

@ -841,7 +841,7 @@ static int dnet_probe(struct platform_device *pdev)
return err;
}
static int dnet_remove(struct platform_device *pdev)
static void dnet_remove(struct platform_device *pdev)
{
struct net_device *dev;
@ -859,13 +859,11 @@ static int dnet_remove(struct platform_device *pdev)
free_irq(dev->irq, dev);
free_netdev(dev);
}
return 0;
}
static struct platform_driver dnet_driver = {
.probe = dnet_probe,
.remove = dnet_remove,
.remove_new = dnet_remove,
.driver = {
.name = "dnet",
},

View File

@ -2577,7 +2577,7 @@ static int tsnep_probe(struct platform_device *pdev)
return retval;
}
static int tsnep_remove(struct platform_device *pdev)
static void tsnep_remove(struct platform_device *pdev)
{
struct tsnep_adapter *adapter = platform_get_drvdata(pdev);
@ -2593,8 +2593,6 @@ static int tsnep_remove(struct platform_device *pdev)
mdiobus_unregister(adapter->mdiobus);
tsnep_disable_irq(adapter, ECM_INT_ALL);
return 0;
}
static const struct of_device_id tsnep_of_match[] = {
@ -2609,7 +2607,7 @@ static struct platform_driver tsnep_driver = {
.of_match_table = tsnep_of_match,
},
.probe = tsnep_probe,
.remove = tsnep_remove,
.remove_new = tsnep_remove,
};
module_platform_driver(tsnep_driver);

View File

@ -1254,7 +1254,7 @@ static int ethoc_probe(struct platform_device *pdev)
* ethoc_remove - shutdown OpenCores ethernet MAC
* @pdev: platform device
*/
static int ethoc_remove(struct platform_device *pdev)
static void ethoc_remove(struct platform_device *pdev)
{
struct net_device *netdev = platform_get_drvdata(pdev);
struct ethoc *priv = netdev_priv(netdev);
@ -1271,8 +1271,6 @@ static int ethoc_remove(struct platform_device *pdev)
unregister_netdev(netdev);
free_netdev(netdev);
}
return 0;
}
#ifdef CONFIG_PM
@ -1298,7 +1296,7 @@ MODULE_DEVICE_TABLE(of, ethoc_match);
static struct platform_driver ethoc_driver = {
.probe = ethoc_probe,
.remove = ethoc_remove,
.remove_new = ethoc_remove,
.suspend = ethoc_suspend,
.resume = ethoc_resume,
.driver = {

View File

@ -2012,7 +2012,7 @@ static int ftgmac100_probe(struct platform_device *pdev)
return err;
}
static int ftgmac100_remove(struct platform_device *pdev)
static void ftgmac100_remove(struct platform_device *pdev)
{
struct net_device *netdev;
struct ftgmac100 *priv;
@ -2040,7 +2040,6 @@ static int ftgmac100_remove(struct platform_device *pdev)
netif_napi_del(&priv->napi);
free_netdev(netdev);
return 0;
}
static const struct of_device_id ftgmac100_of_match[] = {
@ -2051,7 +2050,7 @@ MODULE_DEVICE_TABLE(of, ftgmac100_of_match);
static struct platform_driver ftgmac100_driver = {
.probe = ftgmac100_probe,
.remove = ftgmac100_remove,
.remove_new = ftgmac100_remove,
.driver = {
.name = DRV_NAME,
.of_match_table = ftgmac100_of_match,

View File

@ -1219,7 +1219,7 @@ static int ftmac100_probe(struct platform_device *pdev)
return err;
}
static int ftmac100_remove(struct platform_device *pdev)
static void ftmac100_remove(struct platform_device *pdev)
{
struct net_device *netdev;
struct ftmac100 *priv;
@ -1234,7 +1234,6 @@ static int ftmac100_remove(struct platform_device *pdev)
netif_napi_del(&priv->napi);
free_netdev(netdev);
return 0;
}
static const struct of_device_id ftmac100_of_ids[] = {
@ -1244,7 +1243,7 @@ static const struct of_device_id ftmac100_of_ids[] = {
static struct platform_driver ftmac100_driver = {
.probe = ftmac100_probe,
.remove = ftmac100_remove,
.remove_new = ftmac100_remove,
.driver = {
.name = DRV_NAME,
.of_match_table = ftmac100_of_ids

View File

@ -1021,7 +1021,7 @@ static int hip04_mac_probe(struct platform_device *pdev)
return ret;
}
static int hip04_remove(struct platform_device *pdev)
static void hip04_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct hip04_priv *priv = netdev_priv(ndev);
@ -1035,8 +1035,6 @@ static int hip04_remove(struct platform_device *pdev)
of_node_put(priv->phy_node);
cancel_work_sync(&priv->tx_timeout_task);
free_netdev(ndev);
return 0;
}
static const struct of_device_id hip04_mac_match[] = {
@ -1048,7 +1046,7 @@ MODULE_DEVICE_TABLE(of, hip04_mac_match);
static struct platform_driver hip04_mac_driver = {
.probe = hip04_mac_probe,
.remove = hip04_remove,
.remove_new = hip04_remove,
.driver = {
.name = DRV_NAME,
.of_match_table = hip04_mac_match,

View File

@ -893,7 +893,7 @@ static int hisi_femac_drv_probe(struct platform_device *pdev)
return ret;
}
static int hisi_femac_drv_remove(struct platform_device *pdev)
static void hisi_femac_drv_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct hisi_femac_priv *priv = netdev_priv(ndev);
@ -904,8 +904,6 @@ static int hisi_femac_drv_remove(struct platform_device *pdev)
phy_disconnect(ndev->phydev);
clk_disable_unprepare(priv->clk);
free_netdev(ndev);
return 0;
}
#ifdef CONFIG_PM
@ -961,7 +959,7 @@ static struct platform_driver hisi_femac_driver = {
.of_match_table = hisi_femac_match,
},
.probe = hisi_femac_drv_probe,
.remove = hisi_femac_drv_remove,
.remove_new = hisi_femac_drv_remove,
#ifdef CONFIG_PM
.suspend = hisi_femac_drv_suspend,
.resume = hisi_femac_drv_resume,

View File

@ -1282,7 +1282,7 @@ static int hix5hd2_dev_probe(struct platform_device *pdev)
return ret;
}
static int hix5hd2_dev_remove(struct platform_device *pdev)
static void hix5hd2_dev_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct hix5hd2_priv *priv = netdev_priv(ndev);
@ -1298,8 +1298,6 @@ static int hix5hd2_dev_remove(struct platform_device *pdev)
of_node_put(priv->phy_node);
cancel_work_sync(&priv->tx_timeout_task);
free_netdev(ndev);
return 0;
}
static const struct of_device_id hix5hd2_of_match[] = {
@ -1319,7 +1317,7 @@ static struct platform_driver hix5hd2_dev_driver = {
.of_match_table = hix5hd2_of_match,
},
.probe = hix5hd2_dev_probe,
.remove = hix5hd2_dev_remove,
.remove_new = hix5hd2_dev_remove,
};
module_platform_driver(hix5hd2_dev_driver);

View File

@ -3007,7 +3007,7 @@ static int hns_dsaf_probe(struct platform_device *pdev)
* hns_dsaf_remove - remove dsaf dev
* @pdev: dasf platform device
*/
static int hns_dsaf_remove(struct platform_device *pdev)
static void hns_dsaf_remove(struct platform_device *pdev)
{
struct dsaf_device *dsaf_dev = dev_get_drvdata(&pdev->dev);
@ -3020,8 +3020,6 @@ static int hns_dsaf_remove(struct platform_device *pdev)
hns_dsaf_free(dsaf_dev);
hns_dsaf_free_dev(dsaf_dev);
return 0;
}
static const struct of_device_id g_dsaf_match[] = {
@ -3033,7 +3031,7 @@ MODULE_DEVICE_TABLE(of, g_dsaf_match);
static struct platform_driver g_dsaf_driver = {
.probe = hns_dsaf_probe,
.remove = hns_dsaf_remove,
.remove_new = hns_dsaf_remove,
.driver = {
.name = DSAF_DRV_NAME,
.of_match_table = g_dsaf_match,

View File

@ -2384,7 +2384,7 @@ static int hns_nic_dev_probe(struct platform_device *pdev)
return ret;
}
static int hns_nic_dev_remove(struct platform_device *pdev)
static void hns_nic_dev_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct hns_nic_priv *priv = netdev_priv(ndev);
@ -2413,7 +2413,6 @@ static int hns_nic_dev_remove(struct platform_device *pdev)
of_node_put(to_of_node(priv->fwnode));
free_netdev(ndev);
return 0;
}
static const struct of_device_id hns_enet_of_match[] = {
@ -2431,7 +2430,7 @@ static struct platform_driver hns_nic_dev_driver = {
.acpi_match_table = ACPI_PTR(hns_enet_acpi_match),
},
.probe = hns_nic_dev_probe,
.remove = hns_nic_dev_remove,
.remove_new = hns_nic_dev_remove,
};
module_platform_driver(hns_nic_dev_driver);

View File

@ -610,7 +610,7 @@ static int hns_mdio_probe(struct platform_device *pdev)
*
* Return 0 on success, negative on failure
*/
static int hns_mdio_remove(struct platform_device *pdev)
static void hns_mdio_remove(struct platform_device *pdev)
{
struct mii_bus *bus;
@ -618,7 +618,6 @@ static int hns_mdio_remove(struct platform_device *pdev)
mdiobus_unregister(bus);
platform_set_drvdata(pdev, NULL);
return 0;
}
static const struct of_device_id hns_mdio_match[] = {
@ -636,7 +635,7 @@ MODULE_DEVICE_TABLE(acpi, hns_mdio_acpi_match);
static struct platform_driver hns_mdio_driver = {
.probe = hns_mdio_probe,
.remove = hns_mdio_remove,
.remove_new = hns_mdio_remove,
.driver = {
.name = MDIO_DRV_NAME,
.of_match_table = hns_mdio_match,

View File

@ -153,7 +153,7 @@ static int sni_82596_probe(struct platform_device *dev)
return retval;
}
static int sni_82596_driver_remove(struct platform_device *pdev)
static void sni_82596_driver_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
struct i596_private *lp = netdev_priv(dev);
@ -164,12 +164,11 @@ static int sni_82596_driver_remove(struct platform_device *pdev)
iounmap(lp->ca);
iounmap(lp->mpu_port);
free_netdev (dev);
return 0;
}
static struct platform_driver sni_82596_driver = {
.probe = sni_82596_probe,
.remove = sni_82596_driver_remove,
.remove_new = sni_82596_driver_remove,
.driver = {
.name = sni_82596_string,
},

View File

@ -90,7 +90,7 @@ static struct ehea_bcmc_reg_array ehea_bcmc_regs;
static int ehea_probe_adapter(struct platform_device *dev);
static int ehea_remove(struct platform_device *dev);
static void ehea_remove(struct platform_device *dev);
static const struct of_device_id ehea_module_device_table[] = {
{
@ -121,7 +121,7 @@ static struct platform_driver ehea_driver = {
.of_match_table = ehea_device_table,
},
.probe = ehea_probe_adapter,
.remove = ehea_remove,
.remove_new = ehea_remove,
};
void ehea_dump(void *adr, int len, char *msg)
@ -3471,7 +3471,7 @@ static int ehea_probe_adapter(struct platform_device *dev)
return ret;
}
static int ehea_remove(struct platform_device *dev)
static void ehea_remove(struct platform_device *dev)
{
struct ehea_adapter *adapter = platform_get_drvdata(dev);
int i;
@ -3492,8 +3492,6 @@ static int ehea_remove(struct platform_device *dev)
list_del(&adapter->list);
ehea_update_firmware_handles();
return 0;
}
static int check_module_parm(void)

View File

@ -3253,7 +3253,7 @@ static int emac_probe(struct platform_device *ofdev)
return err;
}
static int emac_remove(struct platform_device *ofdev)
static void emac_remove(struct platform_device *ofdev)
{
struct emac_instance *dev = platform_get_drvdata(ofdev);
@ -3290,8 +3290,6 @@ static int emac_remove(struct platform_device *ofdev)
irq_dispose_mapping(dev->emac_irq);
free_netdev(dev->ndev);
return 0;
}
/* XXX Features in here should be replaced by properties... */
@ -3319,7 +3317,7 @@ static struct platform_driver emac_driver = {
.of_match_table = emac_match,
},
.probe = emac_probe,
.remove = emac_remove,
.remove_new = emac_remove,
};
static void __init emac_make_bootlist(void)

View File

@ -711,7 +711,7 @@ static int mal_probe(struct platform_device *ofdev)
return err;
}
static int mal_remove(struct platform_device *ofdev)
static void mal_remove(struct platform_device *ofdev)
{
struct mal_instance *mal = platform_get_drvdata(ofdev);
@ -740,8 +740,6 @@ static int mal_remove(struct platform_device *ofdev)
NUM_RX_BUFF * mal->num_rx_chans), mal->bd_virt,
mal->bd_dma);
kfree(mal);
return 0;
}
static const struct of_device_id mal_platform_match[] =
@ -770,7 +768,7 @@ static struct platform_driver mal_of_driver = {
.of_match_table = mal_platform_match,
},
.probe = mal_probe,
.remove = mal_remove,
.remove_new = mal_remove,
};
int __init mal_init(void)

View File

@ -273,7 +273,7 @@ static int rgmii_probe(struct platform_device *ofdev)
return rc;
}
static int rgmii_remove(struct platform_device *ofdev)
static void rgmii_remove(struct platform_device *ofdev)
{
struct rgmii_instance *dev = platform_get_drvdata(ofdev);
@ -281,8 +281,6 @@ static int rgmii_remove(struct platform_device *ofdev)
iounmap(dev->base);
kfree(dev);
return 0;
}
static const struct of_device_id rgmii_match[] =
@ -302,7 +300,7 @@ static struct platform_driver rgmii_driver = {
.of_match_table = rgmii_match,
},
.probe = rgmii_probe,
.remove = rgmii_remove,
.remove_new = rgmii_remove,
};
int __init rgmii_init(void)

View File

@ -130,7 +130,7 @@ static int tah_probe(struct platform_device *ofdev)
return rc;
}
static int tah_remove(struct platform_device *ofdev)
static void tah_remove(struct platform_device *ofdev)
{
struct tah_instance *dev = platform_get_drvdata(ofdev);
@ -138,8 +138,6 @@ static int tah_remove(struct platform_device *ofdev)
iounmap(dev->base);
kfree(dev);
return 0;
}
static const struct of_device_id tah_match[] =
@ -160,7 +158,7 @@ static struct platform_driver tah_driver = {
.of_match_table = tah_match,
},
.probe = tah_probe,
.remove = tah_remove,
.remove_new = tah_remove,
};
int __init tah_init(void)

View File

@ -278,7 +278,7 @@ static int zmii_probe(struct platform_device *ofdev)
return rc;
}
static int zmii_remove(struct platform_device *ofdev)
static void zmii_remove(struct platform_device *ofdev)
{
struct zmii_instance *dev = platform_get_drvdata(ofdev);
@ -286,8 +286,6 @@ static int zmii_remove(struct platform_device *ofdev)
iounmap(dev->base);
kfree(dev);
return 0;
}
static const struct of_device_id zmii_match[] =
@ -308,7 +306,7 @@ static struct platform_driver zmii_driver = {
.of_match_table = zmii_match,
},
.probe = zmii_probe,
.remove = zmii_remove,
.remove_new = zmii_remove,
};
int __init zmii_init(void)

View File

@ -1380,13 +1380,11 @@ static int korina_probe(struct platform_device *pdev)
return rc;
}
static int korina_remove(struct platform_device *pdev)
static void korina_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
unregister_netdev(dev);
return 0;
}
#ifdef CONFIG_OF
@ -1405,7 +1403,7 @@ static struct platform_driver korina_driver = {
.of_match_table = of_match_ptr(korina_match),
},
.probe = korina_probe,
.remove = korina_remove,
.remove_new = korina_remove,
};
module_platform_driver(korina_driver);

View File

@ -721,8 +721,7 @@ ltq_etop_probe(struct platform_device *pdev)
return err;
}
static int
ltq_etop_remove(struct platform_device *pdev)
static void ltq_etop_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
@ -732,11 +731,10 @@ ltq_etop_remove(struct platform_device *pdev)
ltq_etop_mdio_cleanup(dev);
unregister_netdev(dev);
}
return 0;
}
static struct platform_driver ltq_mii_driver = {
.remove = ltq_etop_remove,
.remove_new = ltq_etop_remove,
.driver = {
.name = "ltq_etop",
},

View File

@ -641,7 +641,7 @@ static int xrx200_probe(struct platform_device *pdev)
return err;
}
static int xrx200_remove(struct platform_device *pdev)
static void xrx200_remove(struct platform_device *pdev)
{
struct xrx200_priv *priv = platform_get_drvdata(pdev);
struct net_device *net_dev = priv->net_dev;
@ -659,8 +659,6 @@ static int xrx200_remove(struct platform_device *pdev)
/* shut down hardware */
xrx200_hw_cleanup(priv);
return 0;
}
static const struct of_device_id xrx200_match[] = {
@ -671,7 +669,7 @@ MODULE_DEVICE_TABLE(of, xrx200_match);
static struct platform_driver xrx200_driver = {
.probe = xrx200_probe,
.remove = xrx200_remove,
.remove_new = xrx200_remove,
.driver = {
.name = "lantiq,xrx200-net",
.of_match_table = xrx200_match,

View File

@ -294,13 +294,11 @@ static int liteeth_probe(struct platform_device *pdev)
return 0;
}
static int liteeth_remove(struct platform_device *pdev)
static void liteeth_remove(struct platform_device *pdev)
{
struct net_device *netdev = platform_get_drvdata(pdev);
unregister_netdev(netdev);
return 0;
}
static const struct of_device_id liteeth_of_match[] = {
@ -311,7 +309,7 @@ MODULE_DEVICE_TABLE(of, liteeth_of_match);
static struct platform_driver liteeth_driver = {
.probe = liteeth_probe,
.remove = liteeth_remove,
.remove_new = liteeth_remove,
.driver = {
.name = DRV_NAME,
.of_match_table = liteeth_of_match,

View File

@ -2892,19 +2892,18 @@ static int mv643xx_eth_shared_probe(struct platform_device *pdev)
return ret;
}
static int mv643xx_eth_shared_remove(struct platform_device *pdev)
static void mv643xx_eth_shared_remove(struct platform_device *pdev)
{
struct mv643xx_eth_shared_private *msp = platform_get_drvdata(pdev);
mv643xx_eth_shared_of_remove();
if (!IS_ERR(msp->clk))
clk_disable_unprepare(msp->clk);
return 0;
}
static struct platform_driver mv643xx_eth_shared_driver = {
.probe = mv643xx_eth_shared_probe,
.remove = mv643xx_eth_shared_remove,
.remove_new = mv643xx_eth_shared_remove,
.driver = {
.name = MV643XX_ETH_SHARED_NAME,
.of_match_table = of_match_ptr(mv643xx_eth_shared_ids),
@ -3279,7 +3278,7 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
return err;
}
static int mv643xx_eth_remove(struct platform_device *pdev)
static void mv643xx_eth_remove(struct platform_device *pdev)
{
struct mv643xx_eth_private *mp = platform_get_drvdata(pdev);
struct net_device *dev = mp->dev;
@ -3293,8 +3292,6 @@ static int mv643xx_eth_remove(struct platform_device *pdev)
clk_disable_unprepare(mp->clk);
free_netdev(mp->dev);
return 0;
}
static void mv643xx_eth_shutdown(struct platform_device *pdev)
@ -3311,7 +3308,7 @@ static void mv643xx_eth_shutdown(struct platform_device *pdev)
static struct platform_driver mv643xx_eth_driver = {
.probe = mv643xx_eth_probe,
.remove = mv643xx_eth_remove,
.remove_new = mv643xx_eth_remove,
.shutdown = mv643xx_eth_shutdown,
.driver = {
.name = MV643XX_ETH_NAME,

View File

@ -388,7 +388,7 @@ static int orion_mdio_probe(struct platform_device *pdev)
return ret;
}
static int orion_mdio_remove(struct platform_device *pdev)
static void orion_mdio_remove(struct platform_device *pdev)
{
struct mii_bus *bus = platform_get_drvdata(pdev);
struct orion_mdio_dev *dev = bus->priv;
@ -404,8 +404,6 @@ static int orion_mdio_remove(struct platform_device *pdev)
clk_disable_unprepare(dev->clk[i]);
clk_put(dev->clk[i]);
}
return 0;
}
static const struct of_device_id orion_mdio_match[] = {
@ -426,7 +424,7 @@ MODULE_DEVICE_TABLE(acpi, orion_mdio_acpi_match);
static struct platform_driver orion_mdio_driver = {
.probe = orion_mdio_probe,
.remove = orion_mdio_remove,
.remove_new = orion_mdio_remove,
.driver = {
.name = "orion-mdio",
.of_match_table = orion_mdio_match,

View File

@ -5725,7 +5725,7 @@ static int mvneta_probe(struct platform_device *pdev)
}
/* Device removal routine */
static int mvneta_remove(struct platform_device *pdev)
static void mvneta_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
struct mvneta_port *pp = netdev_priv(dev);
@ -5744,8 +5744,6 @@ static int mvneta_remove(struct platform_device *pdev)
1 << pp->id);
mvneta_bm_put(pp->bm_priv);
}
return 0;
}
#ifdef CONFIG_PM_SLEEP
@ -5871,7 +5869,7 @@ MODULE_DEVICE_TABLE(of, mvneta_match);
static struct platform_driver mvneta_driver = {
.probe = mvneta_probe,
.remove = mvneta_remove,
.remove_new = mvneta_remove,
.driver = {
.name = MVNETA_DRIVER_NAME,
.of_match_table = mvneta_match,

View File

@ -457,7 +457,7 @@ static int mvneta_bm_probe(struct platform_device *pdev)
return err;
}
static int mvneta_bm_remove(struct platform_device *pdev)
static void mvneta_bm_remove(struct platform_device *pdev)
{
struct mvneta_bm *priv = platform_get_drvdata(pdev);
u8 all_ports_map = 0xff;
@ -475,8 +475,6 @@ static int mvneta_bm_remove(struct platform_device *pdev)
mvneta_bm_write(priv, MVNETA_BM_COMMAND_REG, MVNETA_BM_STOP_MASK);
clk_disable_unprepare(priv->clk);
return 0;
}
static const struct of_device_id mvneta_bm_match[] = {
@ -487,7 +485,7 @@ MODULE_DEVICE_TABLE(of, mvneta_bm_match);
static struct platform_driver mvneta_bm_driver = {
.probe = mvneta_bm_probe,
.remove = mvneta_bm_remove,
.remove_new = mvneta_bm_remove,
.driver = {
.name = MVNETA_BM_DRIVER_NAME,
.of_match_table = mvneta_bm_match,

View File

@ -7662,7 +7662,7 @@ static int mvpp2_probe(struct platform_device *pdev)
return err;
}
static int mvpp2_remove(struct platform_device *pdev)
static void mvpp2_remove(struct platform_device *pdev)
{
struct mvpp2 *priv = platform_get_drvdata(pdev);
struct fwnode_handle *fwnode = pdev->dev.fwnode;
@ -7700,15 +7700,13 @@ static int mvpp2_remove(struct platform_device *pdev)
}
if (is_acpi_node(port_fwnode))
return 0;
return;
clk_disable_unprepare(priv->axi_clk);
clk_disable_unprepare(priv->mg_core_clk);
clk_disable_unprepare(priv->mg_clk);
clk_disable_unprepare(priv->pp_clk);
clk_disable_unprepare(priv->gop_clk);
return 0;
}
static const struct of_device_id mvpp2_match[] = {
@ -7734,7 +7732,7 @@ MODULE_DEVICE_TABLE(acpi, mvpp2_acpi_match);
static struct platform_driver mvpp2_driver = {
.probe = mvpp2_probe,
.remove = mvpp2_remove,
.remove_new = mvpp2_remove,
.driver = {
.name = MVPP2_DRIVER_NAME,
.of_match_table = mvpp2_match,

View File

@ -1528,7 +1528,7 @@ static int pxa168_eth_probe(struct platform_device *pdev)
return err;
}
static int pxa168_eth_remove(struct platform_device *pdev)
static void pxa168_eth_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
struct pxa168_eth_private *pep = netdev_priv(dev);
@ -1547,7 +1547,6 @@ static int pxa168_eth_remove(struct platform_device *pdev)
mdiobus_free(pep->smi_bus);
unregister_netdev(dev);
free_netdev(dev);
return 0;
}
static void pxa168_eth_shutdown(struct platform_device *pdev)
@ -1580,7 +1579,7 @@ MODULE_DEVICE_TABLE(of, pxa168_eth_of_match);
static struct platform_driver pxa168_eth_driver = {
.probe = pxa168_eth_probe,
.remove = pxa168_eth_remove,
.remove_new = pxa168_eth_remove,
.shutdown = pxa168_eth_shutdown,
.resume = pxa168_eth_resume,
.suspend = pxa168_eth_suspend,

View File

@ -5003,7 +5003,7 @@ static int mtk_probe(struct platform_device *pdev)
return err;
}
static int mtk_remove(struct platform_device *pdev)
static void mtk_remove(struct platform_device *pdev)
{
struct mtk_eth *eth = platform_get_drvdata(pdev);
struct mtk_mac *mac;
@ -5025,8 +5025,6 @@ static int mtk_remove(struct platform_device *pdev)
netif_napi_del(&eth->rx_napi);
mtk_cleanup(eth);
mtk_mdio_cleanup(eth);
return 0;
}
static const struct mtk_soc_data mt2701_data = {
@ -5227,7 +5225,7 @@ MODULE_DEVICE_TABLE(of, of_mtk_match);
static struct platform_driver mtk_driver = {
.probe = mtk_probe,
.remove = mtk_remove,
.remove_new = mtk_remove,
.driver = {
.name = "mtk_soc_eth",
.of_match_table = of_mtk_match,

View File

@ -471,7 +471,7 @@ static int mlxbf_gige_probe(struct platform_device *pdev)
return err;
}
static int mlxbf_gige_remove(struct platform_device *pdev)
static void mlxbf_gige_remove(struct platform_device *pdev)
{
struct mlxbf_gige *priv = platform_get_drvdata(pdev);
@ -479,8 +479,6 @@ static int mlxbf_gige_remove(struct platform_device *pdev)
phy_disconnect(priv->netdev->phydev);
mlxbf_gige_mdio_remove(priv);
platform_set_drvdata(pdev, NULL);
return 0;
}
static void mlxbf_gige_shutdown(struct platform_device *pdev)
@ -499,7 +497,7 @@ MODULE_DEVICE_TABLE(acpi, mlxbf_gige_acpi_match);
static struct platform_driver mlxbf_gige_driver = {
.probe = mlxbf_gige_probe,
.remove = mlxbf_gige_remove,
.remove_new = mlxbf_gige_remove,
.shutdown = mlxbf_gige_shutdown,
.driver = {
.name = KBUILD_MODNAME,

View File

@ -1228,7 +1228,7 @@ static int ks8842_probe(struct platform_device *pdev)
return err;
}
static int ks8842_remove(struct platform_device *pdev)
static void ks8842_remove(struct platform_device *pdev)
{
struct net_device *netdev = platform_get_drvdata(pdev);
struct ks8842_adapter *adapter = netdev_priv(netdev);
@ -1239,7 +1239,6 @@ static int ks8842_remove(struct platform_device *pdev)
iounmap(adapter->hw_addr);
free_netdev(netdev);
release_mem_region(iomem->start, resource_size(iomem));
return 0;
}
@ -1248,7 +1247,7 @@ static struct platform_driver ks8842_platform_driver = {
.name = DRV_NAME,
},
.probe = ks8842_probe,
.remove = ks8842_remove,
.remove_new = ks8842_remove,
};
module_platform_driver(ks8842_platform_driver);

View File

@ -327,11 +327,9 @@ static int ks8851_probe_par(struct platform_device *pdev)
return ks8851_probe_common(netdev, dev, msg_enable);
}
static int ks8851_remove_par(struct platform_device *pdev)
static void ks8851_remove_par(struct platform_device *pdev)
{
ks8851_remove_common(&pdev->dev);
return 0;
}
static const struct of_device_id ks8851_match_table[] = {
@ -347,7 +345,7 @@ static struct platform_driver ks8851_driver = {
.pm = &ks8851_pm_ops,
},
.probe = ks8851_probe_par,
.remove = ks8851_remove_par,
.remove_new = ks8851_remove_par,
};
module_platform_driver(ks8851_driver);

View File

@ -1261,7 +1261,7 @@ static int lan966x_probe(struct platform_device *pdev)
return err;
}
static int lan966x_remove(struct platform_device *pdev)
static void lan966x_remove(struct platform_device *pdev)
{
struct lan966x *lan966x = platform_get_drvdata(pdev);
@ -1280,13 +1280,11 @@ static int lan966x_remove(struct platform_device *pdev)
lan966x_ptp_deinit(lan966x);
debugfs_remove_recursive(lan966x->debugfs_root);
return 0;
}
static struct platform_driver lan966x_driver = {
.probe = lan966x_probe,
.remove = lan966x_remove,
.remove_new = lan966x_remove,
.driver = {
.name = "lan966x-switch",
.of_match_table = lan966x_match,

View File

@ -911,7 +911,7 @@ static int mchp_sparx5_probe(struct platform_device *pdev)
return err;
}
static int mchp_sparx5_remove(struct platform_device *pdev)
static void mchp_sparx5_remove(struct platform_device *pdev)
{
struct sparx5 *sparx5 = platform_get_drvdata(pdev);
@ -931,8 +931,6 @@ static int mchp_sparx5_remove(struct platform_device *pdev)
/* Unregister netdevs */
sparx5_unregister_notifier_blocks(sparx5);
destroy_workqueue(sparx5->mact_queue);
return 0;
}
static const struct of_device_id mchp_sparx5_match[] = {
@ -943,7 +941,7 @@ MODULE_DEVICE_TABLE(of, mchp_sparx5_match);
static struct platform_driver mchp_sparx5_driver = {
.probe = mchp_sparx5_probe,
.remove = mchp_sparx5_remove,
.remove_new = mchp_sparx5_remove,
.driver = {
.name = "sparx5-switch",
.of_match_table = mchp_sparx5_match,

View File

@ -558,7 +558,7 @@ static int moxart_mac_probe(struct platform_device *pdev)
return ret;
}
static int moxart_remove(struct platform_device *pdev)
static void moxart_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
@ -566,8 +566,6 @@ static int moxart_remove(struct platform_device *pdev)
devm_free_irq(&pdev->dev, ndev->irq, ndev);
moxart_mac_free_memory(ndev);
free_netdev(ndev);
return 0;
}
static const struct of_device_id moxart_mac_match[] = {
@ -578,7 +576,7 @@ MODULE_DEVICE_TABLE(of, moxart_mac_match);
static struct platform_driver moxart_mac_driver = {
.probe = moxart_mac_probe,
.remove = moxart_remove,
.remove_new = moxart_remove,
.driver = {
.name = "moxart-ethernet",
.of_match_table = moxart_mac_match,

View File

@ -392,7 +392,7 @@ static int mscc_ocelot_probe(struct platform_device *pdev)
return err;
}
static int mscc_ocelot_remove(struct platform_device *pdev)
static void mscc_ocelot_remove(struct platform_device *pdev)
{
struct ocelot *ocelot = platform_get_drvdata(pdev);
@ -408,13 +408,11 @@ static int mscc_ocelot_remove(struct platform_device *pdev)
unregister_switchdev_notifier(&ocelot_switchdev_nb);
unregister_netdevice_notifier(&ocelot_netdevice_nb);
devlink_free(ocelot->devlink);
return 0;
}
static struct platform_driver mscc_ocelot_driver = {
.probe = mscc_ocelot_probe,
.remove = mscc_ocelot_remove,
.remove_new = mscc_ocelot_remove,
.driver = {
.name = "ocelot-switch",
.of_match_table = mscc_ocelot_match,

View File

@ -227,7 +227,7 @@ MODULE_ALIAS("platform:jazzsonic");
#include "sonic.c"
static int jazz_sonic_device_remove(struct platform_device *pdev)
static void jazz_sonic_device_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
struct sonic_local* lp = netdev_priv(dev);
@ -237,13 +237,11 @@ static int jazz_sonic_device_remove(struct platform_device *pdev)
lp->descriptors, lp->descriptors_laddr);
release_mem_region(dev->base_addr, SONIC_MEM_SIZE);
free_netdev(dev);
return 0;
}
static struct platform_driver jazz_sonic_driver = {
.probe = jazz_sonic_probe,
.remove = jazz_sonic_device_remove,
.remove_new = jazz_sonic_device_remove,
.driver = {
.name = jazz_sonic_string,
},

View File

@ -532,7 +532,7 @@ MODULE_ALIAS("platform:macsonic");
#include "sonic.c"
static int mac_sonic_platform_remove(struct platform_device *pdev)
static void mac_sonic_platform_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
struct sonic_local* lp = netdev_priv(dev);
@ -541,13 +541,11 @@ static int mac_sonic_platform_remove(struct platform_device *pdev)
dma_free_coherent(lp->device, SIZEOF_SONIC_DESC * SONIC_BUS_SCALE(lp->dma_bitmode),
lp->descriptors, lp->descriptors_laddr);
free_netdev(dev);
return 0;
}
static struct platform_driver mac_sonic_platform_driver = {
.probe = mac_sonic_platform_probe,
.remove = mac_sonic_platform_remove,
.remove_new = mac_sonic_platform_remove,
.driver = {
.name = "macsonic",
},

View File

@ -249,7 +249,7 @@ MODULE_DESCRIPTION("Xtensa XT2000 SONIC ethernet driver");
#include "sonic.c"
static int xtsonic_device_remove(struct platform_device *pdev)
static void xtsonic_device_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
struct sonic_local *lp = netdev_priv(dev);
@ -260,13 +260,11 @@ static int xtsonic_device_remove(struct platform_device *pdev)
lp->descriptors, lp->descriptors_laddr);
release_region (dev->base_addr, SONIC_MEM_SIZE);
free_netdev(dev);
return 0;
}
static struct platform_driver xtsonic_driver = {
.probe = xtsonic_probe,
.remove = xtsonic_device_remove,
.remove_new = xtsonic_device_remove,
.driver = {
.name = xtsonic_string,
},

View File

@ -1397,7 +1397,7 @@ static int nixge_probe(struct platform_device *pdev)
return err;
}
static int nixge_remove(struct platform_device *pdev)
static void nixge_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct nixge_priv *priv = netdev_priv(ndev);
@ -1412,13 +1412,11 @@ static int nixge_remove(struct platform_device *pdev)
mdiobus_unregister(priv->mii_bus);
free_netdev(ndev);
return 0;
}
static struct platform_driver nixge_driver = {
.probe = nixge_probe,
.remove = nixge_remove,
.remove_new = nixge_remove,
.driver = {
.name = "nixge",
.of_match_table = nixge_dt_ids,

View File

@ -1417,7 +1417,7 @@ static int lpc_eth_drv_probe(struct platform_device *pdev)
return ret;
}
static int lpc_eth_drv_remove(struct platform_device *pdev)
static void lpc_eth_drv_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct netdata_local *pldat = netdev_priv(ndev);
@ -1436,8 +1436,6 @@ static int lpc_eth_drv_remove(struct platform_device *pdev)
clk_disable_unprepare(pldat->clk);
clk_put(pldat->clk);
free_netdev(ndev);
return 0;
}
#ifdef CONFIG_PM
@ -1505,7 +1503,7 @@ MODULE_DEVICE_TABLE(of, lpc_eth_match);
static struct platform_driver lpc_eth_driver = {
.probe = lpc_eth_drv_probe,
.remove = lpc_eth_drv_remove,
.remove_new = lpc_eth_drv_remove,
#ifdef CONFIG_PM
.suspend = lpc_eth_drv_suspend,
.resume = lpc_eth_drv_resume,

View File

@ -718,7 +718,7 @@ static int emac_probe(struct platform_device *pdev)
return ret;
}
static int emac_remove(struct platform_device *pdev)
static void emac_remove(struct platform_device *pdev)
{
struct net_device *netdev = dev_get_drvdata(&pdev->dev);
struct emac_adapter *adpt = netdev_priv(netdev);
@ -742,8 +742,6 @@ static int emac_remove(struct platform_device *pdev)
iounmap(adpt->phy.base);
free_netdev(netdev);
return 0;
}
static void emac_shutdown(struct platform_device *pdev)
@ -762,7 +760,7 @@ static void emac_shutdown(struct platform_device *pdev)
static struct platform_driver emac_platform_driver = {
.probe = emac_probe,
.remove = emac_remove,
.remove_new = emac_remove,
.driver = {
.name = "qcom-emac",
.of_match_table = emac_dt_match,

View File

@ -2878,7 +2878,7 @@ static int ravb_probe(struct platform_device *pdev)
return error;
}
static int ravb_remove(struct platform_device *pdev)
static void ravb_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct ravb_private *priv = netdev_priv(ndev);
@ -2905,8 +2905,6 @@ static int ravb_remove(struct platform_device *pdev)
reset_control_assert(priv->rstc);
free_netdev(ndev);
platform_set_drvdata(pdev, NULL);
return 0;
}
static int ravb_wol_setup(struct net_device *ndev)
@ -3044,7 +3042,7 @@ static const struct dev_pm_ops ravb_dev_pm_ops = {
static struct platform_driver ravb_driver = {
.probe = ravb_probe,
.remove = ravb_remove,
.remove_new = ravb_remove,
.driver = {
.name = "ravb",
.pm = &ravb_dev_pm_ops,

View File

@ -1968,7 +1968,7 @@ static void rswitch_deinit(struct rswitch_private *priv)
rswitch_clock_disable(priv);
}
static int renesas_eth_sw_remove(struct platform_device *pdev)
static void renesas_eth_sw_remove(struct platform_device *pdev)
{
struct rswitch_private *priv = platform_get_drvdata(pdev);
@ -1978,13 +1978,11 @@ static int renesas_eth_sw_remove(struct platform_device *pdev)
pm_runtime_disable(&pdev->dev);
platform_set_drvdata(pdev, NULL);
return 0;
}
static struct platform_driver renesas_eth_sw_driver_platform = {
.probe = renesas_eth_sw_probe,
.remove = renesas_eth_sw_remove,
.remove_new = renesas_eth_sw_remove,
.driver = {
.name = "renesas_eth_sw",
.of_match_table = renesas_eth_sw_of_table,

View File

@ -3431,7 +3431,7 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
return ret;
}
static int sh_eth_drv_remove(struct platform_device *pdev)
static void sh_eth_drv_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct sh_eth_private *mdp = netdev_priv(ndev);
@ -3441,8 +3441,6 @@ static int sh_eth_drv_remove(struct platform_device *pdev)
sh_mdio_release(mdp);
pm_runtime_disable(&pdev->dev);
free_netdev(ndev);
return 0;
}
#ifdef CONFIG_PM
@ -3562,7 +3560,7 @@ MODULE_DEVICE_TABLE(platform, sh_eth_id_table);
static struct platform_driver sh_eth_driver = {
.probe = sh_eth_drv_probe,
.remove = sh_eth_drv_remove,
.remove_new = sh_eth_drv_remove,
.id_table = sh_eth_id_table,
.driver = {
.name = CARDNAME,

View File

@ -169,13 +169,11 @@ static int sxgbe_platform_probe(struct platform_device *pdev)
* Description: this function calls the main to free the net resources
* and calls the platforms hook and release the resources (e.g. mem).
*/
static int sxgbe_platform_remove(struct platform_device *pdev)
static void sxgbe_platform_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
sxgbe_drv_remove(ndev);
return 0;
}
#ifdef CONFIG_PM
@ -226,7 +224,7 @@ MODULE_DEVICE_TABLE(of, sxgbe_dt_ids);
static struct platform_driver sxgbe_platform_driver = {
.probe = sxgbe_platform_probe,
.remove = sxgbe_platform_remove,
.remove_new = sxgbe_platform_remove,
.driver = {
.name = SXGBE_RESOURCE_NAME,
.pm = &sxgbe_platform_pm_ops,

View File

@ -819,7 +819,7 @@ static int sgiseeq_probe(struct platform_device *pdev)
return err;
}
static int sgiseeq_remove(struct platform_device *pdev)
static void sgiseeq_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
struct sgiseeq_private *sp = netdev_priv(dev);
@ -828,13 +828,11 @@ static int sgiseeq_remove(struct platform_device *pdev)
dma_free_noncoherent(&pdev->dev, sizeof(*sp->srings), sp->srings,
sp->srings_dma, DMA_BIDIRECTIONAL);
free_netdev(dev);
return 0;
}
static struct platform_driver sgiseeq_driver = {
.probe = sgiseeq_probe,
.remove = sgiseeq_remove,
.remove_new = sgiseeq_remove,
.driver = {
.name = "sgiseeq",
}

View File

@ -962,7 +962,7 @@ static int ioc3eth_probe(struct platform_device *pdev)
return err;
}
static int ioc3eth_remove(struct platform_device *pdev)
static void ioc3eth_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
struct ioc3_private *ip = netdev_priv(dev);
@ -973,8 +973,6 @@ static int ioc3eth_remove(struct platform_device *pdev)
unregister_netdev(dev);
del_timer_sync(&ip->ioc3_timer);
free_netdev(dev);
return 0;
}
@ -1275,7 +1273,7 @@ static void ioc3_set_multicast_list(struct net_device *dev)
static struct platform_driver ioc3eth_driver = {
.probe = ioc3eth_probe,
.remove = ioc3eth_remove,
.remove_new = ioc3eth_remove,
.driver = {
.name = "ioc3-eth",
}

View File

@ -854,19 +854,17 @@ static int meth_probe(struct platform_device *pdev)
return 0;
}
static int meth_remove(struct platform_device *pdev)
static void meth_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
unregister_netdev(dev);
free_netdev(dev);
return 0;
}
static struct platform_driver meth_driver = {
.probe = meth_probe,
.remove = meth_remove,
.remove_new = meth_remove,
.driver = {
.name = "meth",
}

View File

@ -2411,7 +2411,7 @@ static int smc_drv_probe(struct platform_device *pdev)
return ret;
}
static int smc_drv_remove(struct platform_device *pdev)
static void smc_drv_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct smc_local *lp = netdev_priv(ndev);
@ -2436,8 +2436,6 @@ static int smc_drv_remove(struct platform_device *pdev)
release_mem_region(res->start, SMC_IO_EXTENT);
free_netdev(ndev);
return 0;
}
static int smc_drv_suspend(struct device *dev)
@ -2480,7 +2478,7 @@ static const struct dev_pm_ops smc_drv_pm_ops = {
static struct platform_driver smc_driver = {
.probe = smc_drv_probe,
.remove = smc_drv_remove,
.remove_new = smc_drv_remove,
.driver = {
.name = CARDNAME,
.pm = &smc_drv_pm_ops,

View File

@ -2314,7 +2314,7 @@ static int smsc911x_init(struct net_device *dev)
return 0;
}
static int smsc911x_drv_remove(struct platform_device *pdev)
static void smsc911x_drv_remove(struct platform_device *pdev)
{
struct net_device *dev;
struct smsc911x_data *pdata;
@ -2348,8 +2348,6 @@ static int smsc911x_drv_remove(struct platform_device *pdev)
free_netdev(dev);
pm_runtime_disable(&pdev->dev);
return 0;
}
/* standard register acces */
@ -2668,7 +2666,7 @@ MODULE_DEVICE_TABLE(acpi, smsc911x_acpi_match);
static struct platform_driver smsc911x_driver = {
.probe = smsc911x_drv_probe,
.remove = smsc911x_drv_remove,
.remove_new = smsc911x_drv_remove,
.driver = {
.name = SMSC_CHIPNAME,
.pm = SMSC911X_PM_OPS,

View File

@ -2150,7 +2150,7 @@ static int netsec_probe(struct platform_device *pdev)
return ret;
}
static int netsec_remove(struct platform_device *pdev)
static void netsec_remove(struct platform_device *pdev)
{
struct netsec_priv *priv = platform_get_drvdata(pdev);
@ -2162,8 +2162,6 @@ static int netsec_remove(struct platform_device *pdev)
pm_runtime_disable(&pdev->dev);
free_netdev(priv->ndev);
return 0;
}
#ifdef CONFIG_PM
@ -2211,7 +2209,7 @@ MODULE_DEVICE_TABLE(acpi, netsec_acpi_ids);
static struct platform_driver netsec_driver = {
.probe = netsec_probe,
.remove = netsec_remove,
.remove_new = netsec_remove,
.driver = {
.name = "netsec",
.pm = &netsec_pm_ops,

View File

@ -1719,7 +1719,7 @@ static int ave_probe(struct platform_device *pdev)
return ret;
}
static int ave_remove(struct platform_device *pdev)
static void ave_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct ave_private *priv = netdev_priv(ndev);
@ -1727,8 +1727,6 @@ static int ave_remove(struct platform_device *pdev)
unregister_netdev(ndev);
netif_napi_del(&priv->napi_rx);
netif_napi_del(&priv->napi_tx);
return 0;
}
#ifdef CONFIG_PM_SLEEP
@ -1976,7 +1974,7 @@ MODULE_DEVICE_TABLE(of, of_ave_match);
static struct platform_driver ave_driver = {
.probe = ave_probe,
.remove = ave_remove,
.remove_new = ave_remove,
.driver = {
.name = "ave",
.pm = AVE_PM_OPS,

View File

@ -10132,7 +10132,7 @@ static int niu_of_probe(struct platform_device *op)
return err;
}
static int niu_of_remove(struct platform_device *op)
static void niu_of_remove(struct platform_device *op)
{
struct net_device *dev = platform_get_drvdata(op);
@ -10165,7 +10165,6 @@ static int niu_of_remove(struct platform_device *op)
free_netdev(dev);
}
return 0;
}
static const struct of_device_id niu_match[] = {
@ -10183,7 +10182,7 @@ static struct platform_driver niu_of_driver = {
.of_match_table = niu_match,
},
.probe = niu_of_probe,
.remove = niu_of_remove,
.remove_new = niu_of_remove,
};
#endif /* CONFIG_SPARC64 */

View File

@ -1234,7 +1234,7 @@ static int bigmac_sbus_probe(struct platform_device *op)
return bigmac_ether_init(op, qec_op);
}
static int bigmac_sbus_remove(struct platform_device *op)
static void bigmac_sbus_remove(struct platform_device *op)
{
struct bigmac *bp = platform_get_drvdata(op);
struct device *parent = op->dev.parent;
@ -1255,8 +1255,6 @@ static int bigmac_sbus_remove(struct platform_device *op)
bp->bblock_dvma);
free_netdev(net_dev);
return 0;
}
static const struct of_device_id bigmac_sbus_match[] = {
@ -1274,7 +1272,7 @@ static struct platform_driver bigmac_sbus_driver = {
.of_match_table = bigmac_sbus_match,
},
.probe = bigmac_sbus_probe,
.remove = bigmac_sbus_remove,
.remove_new = bigmac_sbus_remove,
};
module_platform_driver(bigmac_sbus_driver);

View File

@ -933,7 +933,7 @@ static int qec_sbus_probe(struct platform_device *op)
return qec_ether_init(op);
}
static int qec_sbus_remove(struct platform_device *op)
static void qec_sbus_remove(struct platform_device *op)
{
struct sunqe *qp = platform_get_drvdata(op);
struct net_device *net_dev = qp->dev;
@ -948,8 +948,6 @@ static int qec_sbus_remove(struct platform_device *op)
qp->buffers, qp->buffers_dvma);
free_netdev(net_dev);
return 0;
}
static const struct of_device_id qec_sbus_match[] = {
@ -967,7 +965,7 @@ static struct platform_driver qec_sbus_driver = {
.of_match_table = qec_sbus_match,
},
.probe = qec_sbus_probe,
.remove = qec_sbus_remove,
.remove_new = qec_sbus_remove,
};
static int __init qec_init(void)

View File

@ -511,7 +511,7 @@ static int spl2sw_probe(struct platform_device *pdev)
return ret;
}
static int spl2sw_remove(struct platform_device *pdev)
static void spl2sw_remove(struct platform_device *pdev)
{
struct spl2sw_common *comm;
int i;
@ -538,8 +538,6 @@ static int spl2sw_remove(struct platform_device *pdev)
spl2sw_mdio_remove(comm);
clk_disable_unprepare(comm->clk);
return 0;
}
static const struct of_device_id spl2sw_of_match[] = {
@ -551,7 +549,7 @@ MODULE_DEVICE_TABLE(of, spl2sw_of_match);
static struct platform_driver spl2sw_driver = {
.probe = spl2sw_probe,
.remove = spl2sw_remove,
.remove_new = spl2sw_remove,
.driver = {
.name = "sp7021_emac",
.of_match_table = spl2sw_of_match,

View File

@ -1151,14 +1151,12 @@ static int cpmac_probe(struct platform_device *pdev)
return rc;
}
static int cpmac_remove(struct platform_device *pdev)
static void cpmac_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
unregister_netdev(dev);
free_netdev(dev);
return 0;
}
static struct platform_driver cpmac_driver = {
@ -1166,7 +1164,7 @@ static struct platform_driver cpmac_driver = {
.name = "cpmac",
},
.probe = cpmac_probe,
.remove = cpmac_remove,
.remove_new = cpmac_remove,
};
int __init cpmac_init(void)

View File

@ -2002,7 +2002,7 @@ static int davinci_emac_probe(struct platform_device *pdev)
* Called when removing the device driver. We disable clock usage and release
* the resources taken up by the driver and unregister network device
*/
static int davinci_emac_remove(struct platform_device *pdev)
static void davinci_emac_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct emac_priv *priv = netdev_priv(ndev);
@ -2022,8 +2022,6 @@ static int davinci_emac_remove(struct platform_device *pdev)
if (of_phy_is_fixed_link(np))
of_phy_deregister_fixed_link(np);
free_netdev(ndev);
return 0;
}
static int davinci_emac_suspend(struct device *dev)
@ -2076,7 +2074,7 @@ static struct platform_driver davinci_emac_driver = {
.of_match_table = davinci_emac_of_match,
},
.probe = davinci_emac_probe,
.remove = davinci_emac_remove,
.remove_new = davinci_emac_remove,
};
/**

View File

@ -673,7 +673,7 @@ static int davinci_mdio_probe(struct platform_device *pdev)
return ret;
}
static int davinci_mdio_remove(struct platform_device *pdev)
static void davinci_mdio_remove(struct platform_device *pdev)
{
struct davinci_mdio_data *data = platform_get_drvdata(pdev);
@ -686,8 +686,6 @@ static int davinci_mdio_remove(struct platform_device *pdev)
pm_runtime_dont_use_autosuspend(&pdev->dev);
pm_runtime_disable(&pdev->dev);
return 0;
}
#ifdef CONFIG_PM
@ -766,7 +764,7 @@ static struct platform_driver davinci_mdio_driver = {
.of_match_table = of_match_ptr(davinci_mdio_of_mtable),
},
.probe = davinci_mdio_probe,
.remove = davinci_mdio_remove,
.remove_new = davinci_mdio_remove,
};
static int __init davinci_mdio_init(void)

View File

@ -2228,7 +2228,7 @@ static int netcp_probe(struct platform_device *pdev)
return ret;
}
static int netcp_remove(struct platform_device *pdev)
static void netcp_remove(struct platform_device *pdev)
{
struct netcp_device *netcp_device = platform_get_drvdata(pdev);
struct netcp_intf *netcp_intf, *netcp_tmp;
@ -2256,7 +2256,6 @@ static int netcp_remove(struct platform_device *pdev)
pm_runtime_put_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev);
platform_set_drvdata(pdev, NULL);
return 0;
}
static const struct of_device_id of_match[] = {
@ -2271,7 +2270,7 @@ static struct platform_driver netcp_driver = {
.of_match_table = of_match,
},
.probe = netcp_probe,
.remove = netcp_remove,
.remove_new = netcp_remove,
};
module_platform_driver(netcp_driver);

View File

@ -1660,7 +1660,7 @@ static void tsi108_timed_checker(struct timer_list *t)
mod_timer(&data->timer, jiffies + CHECK_PHY_INTERVAL);
}
static int tsi108_ether_remove(struct platform_device *pdev)
static void tsi108_ether_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
struct tsi108_prv_data *priv = netdev_priv(dev);
@ -1670,15 +1670,13 @@ static int tsi108_ether_remove(struct platform_device *pdev)
iounmap(priv->regs);
iounmap(priv->phyregs);
free_netdev(dev);
return 0;
}
/* Structure for a device driver */
static struct platform_driver tsi_eth_driver = {
.probe = tsi108_init_one,
.remove = tsi108_ether_remove,
.remove_new = tsi108_ether_remove,
.driver = {
.name = "tsi-ethernet",
},

View File

@ -2443,7 +2443,7 @@ static void rhine_remove_one_pci(struct pci_dev *pdev)
pci_disable_device(pdev);
}
static int rhine_remove_one_platform(struct platform_device *pdev)
static void rhine_remove_one_platform(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
struct rhine_private *rp = netdev_priv(dev);
@ -2453,8 +2453,6 @@ static int rhine_remove_one_platform(struct platform_device *pdev)
iounmap(rp->base);
free_netdev(dev);
return 0;
}
static void rhine_shutdown_pci(struct pci_dev *pdev)
@ -2572,7 +2570,7 @@ static struct pci_driver rhine_driver_pci = {
static struct platform_driver rhine_driver_platform = {
.probe = rhine_init_one_platform,
.remove = rhine_remove_one_platform,
.remove_new = rhine_remove_one_platform,
.driver = {
.name = DRV_NAME,
.of_match_table = rhine_of_tbl,

View File

@ -2957,11 +2957,9 @@ static int velocity_platform_probe(struct platform_device *pdev)
return velocity_probe(&pdev->dev, irq, info, BUS_PLATFORM);
}
static int velocity_platform_remove(struct platform_device *pdev)
static void velocity_platform_remove(struct platform_device *pdev)
{
velocity_remove(&pdev->dev);
return 0;
}
#ifdef CONFIG_PM_SLEEP
@ -3249,7 +3247,7 @@ static struct pci_driver velocity_pci_driver = {
static struct platform_driver velocity_platform_driver = {
.probe = velocity_platform_probe,
.remove = velocity_platform_remove,
.remove_new = velocity_platform_remove,
.driver = {
.name = "via-velocity",
.of_match_table = velocity_of_ids,

View File

@ -1062,11 +1062,9 @@ static int w5100_mmio_probe(struct platform_device *pdev)
mac_addr, irq, data ? data->link_gpio : -EINVAL);
}
static int w5100_mmio_remove(struct platform_device *pdev)
static void w5100_mmio_remove(struct platform_device *pdev)
{
w5100_remove(&pdev->dev);
return 0;
}
void *w5100_ops_priv(const struct net_device *ndev)
@ -1273,6 +1271,6 @@ static struct platform_driver w5100_mmio_driver = {
.pm = &w5100_pm_ops,
},
.probe = w5100_mmio_probe,
.remove = w5100_mmio_remove,
.remove_new = w5100_mmio_remove,
};
module_platform_driver(w5100_mmio_driver);

View File

@ -627,7 +627,7 @@ static int w5300_probe(struct platform_device *pdev)
return err;
}
static int w5300_remove(struct platform_device *pdev)
static void w5300_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct w5300_priv *priv = netdev_priv(ndev);
@ -639,7 +639,6 @@ static int w5300_remove(struct platform_device *pdev)
unregister_netdev(ndev);
free_netdev(ndev);
return 0;
}
#ifdef CONFIG_PM_SLEEP
@ -683,7 +682,7 @@ static struct platform_driver w5300_driver = {
.pm = &w5300_pm_ops,
},
.probe = w5300_probe,
.remove = w5300_remove,
.remove_new = w5300_remove,
};
module_platform_driver(w5300_driver);

View File

@ -1626,7 +1626,7 @@ static int temac_probe(struct platform_device *pdev)
return rc;
}
static int temac_remove(struct platform_device *pdev)
static void temac_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct temac_local *lp = netdev_priv(ndev);
@ -1636,7 +1636,6 @@ static int temac_remove(struct platform_device *pdev)
if (lp->phy_node)
of_node_put(lp->phy_node);
temac_mdio_teardown(lp);
return 0;
}
static const struct of_device_id temac_of_match[] = {
@ -1650,7 +1649,7 @@ MODULE_DEVICE_TABLE(of, temac_of_match);
static struct platform_driver temac_driver = {
.probe = temac_probe,
.remove = temac_remove,
.remove_new = temac_remove,
.driver = {
.name = "xilinx_temac",
.of_match_table = temac_of_match,

View File

@ -2183,7 +2183,7 @@ static int axienet_probe(struct platform_device *pdev)
return ret;
}
static int axienet_remove(struct platform_device *pdev)
static void axienet_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct axienet_local *lp = netdev_priv(ndev);
@ -2202,8 +2202,6 @@ static int axienet_remove(struct platform_device *pdev)
clk_disable_unprepare(lp->axi_clk);
free_netdev(ndev);
return 0;
}
static void axienet_shutdown(struct platform_device *pdev)
@ -2256,7 +2254,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(axienet_pm_ops,
static struct platform_driver axienet_driver = {
.probe = axienet_probe,
.remove = axienet_remove,
.remove_new = axienet_remove,
.shutdown = axienet_shutdown,
.driver = {
.name = "xilinx_axienet",

View File

@ -1183,7 +1183,7 @@ static int xemaclite_of_probe(struct platform_device *ofdev)
*
* Return: 0, always.
*/
static int xemaclite_of_remove(struct platform_device *of_dev)
static void xemaclite_of_remove(struct platform_device *of_dev)
{
struct net_device *ndev = platform_get_drvdata(of_dev);
@ -1202,8 +1202,6 @@ static int xemaclite_of_remove(struct platform_device *of_dev)
lp->phy_node = NULL;
free_netdev(ndev);
return 0;
}
#ifdef CONFIG_NET_POLL_CONTROLLER
@ -1262,7 +1260,7 @@ static struct platform_driver xemaclite_of_driver = {
.of_match_table = xemaclite_of_match,
},
.probe = xemaclite_of_probe,
.remove = xemaclite_of_remove,
.remove_new = xemaclite_of_remove,
};
module_platform_driver(xemaclite_of_driver);

Some files were not shown because too many files have changed in this diff Show More