Skip to content

Commit

Permalink
Merge branch 'net-switch-back-to-struct-platform_driver-remove'
Browse files Browse the repository at this point in the history
Uwe Kleine-König says:

====================
net: Switch back to struct platform_driver::remove()

I already sent a patch last week that is very similar to patch #1 of
this series. However the previous submission was based on plain next.
I was asked to resend based on net-next once the merge window closed,
so here comes this v2.  The additional patches address drivers/net/dsa,
drivers/net/mdio and the rest of drivers/net apart from wireless which
has its own tree and will addressed separately at a later point in time.
====================

Link: https://patch.msgid.link/cover.1727949050.git.u.kleine-koenig@baylibre.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
kuba-moo committed Oct 4, 2024
2 parents 41378cf + 46e338b commit d521db3
Show file tree
Hide file tree
Showing 180 changed files with 183 additions and 183 deletions.
2 changes: 1 addition & 1 deletion drivers/net/dsa/b53/b53_mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ MODULE_DEVICE_TABLE(of, b53_mmap_of_table);

static struct platform_driver b53_mmap_driver = {
.probe = b53_mmap_probe,
.remove_new = b53_mmap_remove,
.remove = b53_mmap_remove,
.shutdown = b53_mmap_shutdown,
.driver = {
.name = "b53-switch",
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/dsa/b53/b53_srab.c
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ static void b53_srab_shutdown(struct platform_device *pdev)

static struct platform_driver b53_srab_driver = {
.probe = b53_srab_probe,
.remove_new = b53_srab_remove,
.remove = b53_srab_remove,
.shutdown = b53_srab_shutdown,
.driver = {
.name = "b53-srab-switch",
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/dsa/bcm_sf2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1623,7 +1623,7 @@ static SIMPLE_DEV_PM_OPS(bcm_sf2_pm_ops,

static struct platform_driver bcm_sf2_driver = {
.probe = bcm_sf2_sw_probe,
.remove_new = bcm_sf2_sw_remove,
.remove = bcm_sf2_sw_remove,
.shutdown = bcm_sf2_sw_shutdown,
.driver = {
.name = "brcm-sf2",
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/dsa/hirschmann/hellcreek.c
Original file line number Diff line number Diff line change
Expand Up @@ -2105,7 +2105,7 @@ MODULE_DEVICE_TABLE(of, hellcreek_of_match);

static struct platform_driver hellcreek_driver = {
.probe = hellcreek_probe,
.remove_new = hellcreek_remove,
.remove = hellcreek_remove,
.shutdown = hellcreek_shutdown,
.driver = {
.name = "hellcreek",
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/dsa/lantiq_gswip.c
Original file line number Diff line number Diff line change
Expand Up @@ -2249,7 +2249,7 @@ MODULE_DEVICE_TABLE(of, gswip_of_match);

static struct platform_driver gswip_driver = {
.probe = gswip_probe,
.remove_new = gswip_remove,
.remove = gswip_remove,
.shutdown = gswip_shutdown,
.driver = {
.name = "gswip",
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/dsa/mt7530-mmio.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ static void mt7988_shutdown(struct platform_device *pdev)

static struct platform_driver mt7988_platform_driver = {
.probe = mt7988_probe,
.remove_new = mt7988_remove,
.remove = mt7988_remove,
.shutdown = mt7988_shutdown,
.driver = {
.name = "mt7530-mmio",
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/dsa/ocelot/ocelot_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ static struct platform_driver ocelot_ext_switch_driver = {
.of_match_table = ocelot_ext_switch_of_match,
},
.probe = ocelot_ext_probe,
.remove_new = ocelot_ext_remove,
.remove = ocelot_ext_remove,
.shutdown = ocelot_ext_shutdown,
};
module_platform_driver(ocelot_ext_switch_driver);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/dsa/ocelot/seville_vsc9953.c
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ MODULE_DEVICE_TABLE(of, seville_of_match);

static struct platform_driver seville_vsc9953_driver = {
.probe = seville_probe,
.remove_new = seville_remove,
.remove = seville_remove,
.shutdown = seville_shutdown,
.driver = {
.name = "mscc_seville",
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/dsa/realtek/realtek-mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ EXPORT_SYMBOL_NS_GPL(realtek_mdio_probe, REALTEK_DSA);
* realtek_mdio_remove() - Remove the driver of an MDIO-connected switch
* @mdiodev: mdio_device to be removed.
*
* This function should be used as the .remove_new in an mdio_driver. First
* This function should be used as the .remove in an mdio_driver. First
* it unregisters the DSA switch and then it calls the common remove function.
*
* Context: Can sleep.
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/dsa/realtek/realtek-smi.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ EXPORT_SYMBOL_NS_GPL(realtek_smi_probe, REALTEK_DSA);
* realtek_smi_remove() - Remove the driver of a SMI-connected switch
* @pdev: platform_device to be removed.
*
* This function should be used as the .remove_new in a platform_driver. First
* This function should be used as the .remove in a platform_driver. First
* it unregisters the DSA switch and then it calls the common remove function.
*
* Context: Can sleep.
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/dsa/realtek/rtl8365mb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2164,7 +2164,7 @@ static struct platform_driver rtl8365mb_smi_driver = {
.of_match_table = rtl8365mb_of_match,
},
.probe = realtek_smi_probe,
.remove_new = realtek_smi_remove,
.remove = realtek_smi_remove,
.shutdown = realtek_smi_shutdown,
};

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/dsa/realtek/rtl8366rb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2102,7 +2102,7 @@ static struct platform_driver rtl8366rb_smi_driver = {
.of_match_table = rtl8366rb_of_match,
},
.probe = realtek_smi_probe,
.remove_new = realtek_smi_remove,
.remove = realtek_smi_remove,
.shutdown = realtek_smi_shutdown,
};

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/dsa/rzn1_a5psw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1324,7 +1324,7 @@ static struct platform_driver a5psw_driver = {
.of_match_table = a5psw_of_mtable,
},
.probe = a5psw_probe,
.remove_new = a5psw_remove,
.remove = a5psw_remove,
.shutdown = a5psw_shutdown,
};
module_platform_driver(a5psw_driver);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/dsa/vitesse-vsc73xx-platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ MODULE_DEVICE_TABLE(of, vsc73xx_of_match);

static struct platform_driver vsc73xx_platform_driver = {
.probe = vsc73xx_platform_probe,
.remove_new = vsc73xx_platform_remove,
.remove = vsc73xx_platform_remove,
.shutdown = vsc73xx_platform_shutdown,
.driver = {
.name = "vsc73xx-platform",
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/8390/ax88796.c
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,7 @@ static struct platform_driver axdrv = {
.name = "ax88796",
},
.probe = ax_probe,
.remove_new = ax_remove,
.remove = ax_remove,
.suspend = ax_suspend,
.resume = ax_resume,
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/8390/mcf8390.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ static struct platform_driver mcf8390_drv = {
.name = "mcf8390",
},
.probe = mcf8390_probe,
.remove_new = mcf8390_remove,
.remove = mcf8390_remove,
};

module_platform_driver(mcf8390_drv);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/8390/ne.c
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ static int ne_drv_resume(struct platform_device *pdev)
#endif

static struct platform_driver ne_driver = {
.remove_new = ne_drv_remove,
.remove = ne_drv_remove,
.suspend = ne_drv_suspend,
.resume = ne_drv_resume,
.driver = {
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/actions/owl-emac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1607,7 +1607,7 @@ static struct platform_driver owl_emac_driver = {
.pm = &owl_emac_pm_ops,
},
.probe = owl_emac_probe,
.remove_new = owl_emac_remove,
.remove = owl_emac_remove,
};
module_platform_driver(owl_emac_driver);

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/aeroflex/greth.c
Original file line number Diff line number Diff line change
Expand Up @@ -1564,7 +1564,7 @@ static struct platform_driver greth_of_driver = {
.of_match_table = greth_of_match,
},
.probe = greth_of_probe,
.remove_new = greth_of_remove,
.remove = greth_of_remove,
};

module_platform_driver(greth_of_driver);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/allwinner/sun4i-emac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,7 @@ static struct platform_driver emac_driver = {
.of_match_table = emac_of_match,
},
.probe = emac_probe,
.remove_new = emac_remove,
.remove = emac_remove,
.suspend = emac_suspend,
.resume = emac_resume,
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/altera/altera_tse_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1519,7 +1519,7 @@ MODULE_DEVICE_TABLE(of, altera_tse_ids);

static struct platform_driver altera_tse_driver = {
.probe = altera_tse_probe,
.remove_new = altera_tse_remove,
.remove = altera_tse_remove,
.suspend = NULL,
.resume = NULL,
.driver = {
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/amd/au1000_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,7 @@ static void au1000_remove(struct platform_device *pdev)

static struct platform_driver au1000_eth_driver = {
.probe = au1000_probe,
.remove_new = au1000_remove,
.remove = au1000_remove,
.driver = {
.name = "au1000-eth",
},
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/amd/sunlance.c
Original file line number Diff line number Diff line change
Expand Up @@ -1514,7 +1514,7 @@ static struct platform_driver sunlance_sbus_driver = {
.of_match_table = sunlance_sbus_match,
},
.probe = sunlance_sbus_probe,
.remove_new = sunlance_sbus_remove,
.remove = sunlance_sbus_remove,
};

module_platform_driver(sunlance_sbus_driver);
2 changes: 1 addition & 1 deletion drivers/net/ethernet/amd/xgbe/xgbe-platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ static struct platform_driver xgbe_driver = {
.pm = &xgbe_platform_pm_ops,
},
.probe = xgbe_platform_probe,
.remove_new = xgbe_platform_remove,
.remove = xgbe_platform_remove,
};

int xgbe_platform_init(void)
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/apm/xgene-v2/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ static struct platform_driver xge_driver = {
.acpi_match_table = ACPI_PTR(xge_acpi_match),
},
.probe = xge_probe,
.remove_new = xge_remove,
.remove = xge_remove,
.shutdown = xge_shutdown,
};
module_platform_driver(xge_driver);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/apm/xgene/xgene_enet_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2159,7 +2159,7 @@ static struct platform_driver xgene_enet_driver = {
.acpi_match_table = ACPI_PTR(xgene_enet_acpi_match),
},
.probe = xgene_enet_probe,
.remove_new = xgene_enet_remove,
.remove = xgene_enet_remove,
.shutdown = xgene_enet_shutdown,
};

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/apple/macmace.c
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ static void mac_mace_device_remove(struct platform_device *pdev)

static struct platform_driver mac_mace_driver = {
.probe = mace_probe,
.remove_new = mac_mace_device_remove,
.remove = mac_mace_device_remove,
.driver = {
.name = mac_mace_string,
},
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/arc/emac_rockchip.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ static void emac_rockchip_remove(struct platform_device *pdev)

static struct platform_driver emac_rockchip_driver = {
.probe = emac_rockchip_probe,
.remove_new = emac_rockchip_remove,
.remove = emac_rockchip_remove,
.driver = {
.name = DRV_NAME,
.of_match_table = emac_rockchip_dt_ids,
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/broadcom/asp2/bcmasp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1500,7 +1500,7 @@ static SIMPLE_DEV_PM_OPS(bcmasp_pm_ops,

static struct platform_driver bcmasp_driver = {
.probe = bcmasp_probe,
.remove_new = bcmasp_remove,
.remove = bcmasp_remove,
.shutdown = bcmasp_shutdown,
.driver = {
.name = "brcm,asp-v2",
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/broadcom/bcm4908_enet.c
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ static struct platform_driver bcm4908_enet_driver = {
.of_match_table = bcm4908_enet_of_match,
},
.probe = bcm4908_enet_probe,
.remove_new = bcm4908_enet_remove,
.remove = bcm4908_enet_remove,
};
module_platform_driver(bcm4908_enet_driver);

Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ethernet/broadcom/bcm63xx_enet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1936,7 +1936,7 @@ static void bcm_enet_remove(struct platform_device *pdev)

static struct platform_driver bcm63xx_enet_driver = {
.probe = bcm_enet_probe,
.remove_new = bcm_enet_remove,
.remove = bcm_enet_remove,
.driver = {
.name = "bcm63xx_enet",
},
Expand Down Expand Up @@ -2755,7 +2755,7 @@ static void bcm_enetsw_remove(struct platform_device *pdev)

static struct platform_driver bcm63xx_enetsw_driver = {
.probe = bcm_enetsw_probe,
.remove_new = bcm_enetsw_remove,
.remove = bcm_enetsw_remove,
.driver = {
.name = "bcm63xx_enetsw",
},
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/broadcom/bcmsysport.c
Original file line number Diff line number Diff line change
Expand Up @@ -2899,7 +2899,7 @@ static SIMPLE_DEV_PM_OPS(bcm_sysport_pm_ops,

static struct platform_driver bcm_sysport_driver = {
.probe = bcm_sysport_probe,
.remove_new = bcm_sysport_remove,
.remove = bcm_sysport_remove,
.driver = {
.name = "brcm-systemport",
.of_match_table = bcm_sysport_of_match,
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/broadcom/bgmac-platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ static struct platform_driver bgmac_enet_driver = {
.pm = BGMAC_PM_OPS
},
.probe = bgmac_probe,
.remove_new = bgmac_remove,
.remove = bgmac_remove,
};

module_platform_driver(bgmac_enet_driver);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/broadcom/genet/bcmgenet.c
Original file line number Diff line number Diff line change
Expand Up @@ -4350,7 +4350,7 @@ MODULE_DEVICE_TABLE(acpi, genet_acpi_match);

static struct platform_driver bcmgenet_driver = {
.probe = bcmgenet_probe,
.remove_new = bcmgenet_remove,
.remove = bcmgenet_remove,
.shutdown = bcmgenet_shutdown,
.driver = {
.name = "bcmgenet",
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/broadcom/sb1250-mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -2608,7 +2608,7 @@ static void sbmac_remove(struct platform_device *pldev)

static struct platform_driver sbmac_driver = {
.probe = sbmac_probe,
.remove_new = sbmac_remove,
.remove = sbmac_remove,
.driver = {
.name = sbmac_string,
},
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/cadence/macb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -5483,7 +5483,7 @@ static const struct dev_pm_ops macb_pm_ops = {

static struct platform_driver macb_driver = {
.probe = macb_probe,
.remove_new = macb_remove,
.remove = macb_remove,
.driver = {
.name = "macb",
.of_match_table = of_match_ptr(macb_dt_ids),
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/calxeda/xgmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1919,7 +1919,7 @@ static struct platform_driver xgmac_driver = {
.pm = &xgmac_pm_ops,
},
.probe = xgmac_probe,
.remove_new = xgmac_remove,
.remove = xgmac_remove,
};

module_platform_driver(xgmac_driver);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1545,7 +1545,7 @@ static struct platform_driver octeon_mgmt_driver = {
.of_match_table = octeon_mgmt_match,
},
.probe = octeon_mgmt_probe,
.remove_new = octeon_mgmt_remove,
.remove = octeon_mgmt_remove,
};

module_platform_driver(octeon_mgmt_driver);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/cirrus/cs89x0.c
Original file line number Diff line number Diff line change
Expand Up @@ -1903,7 +1903,7 @@ static struct platform_driver cs89x0_driver = {
.name = DRV_NAME,
.of_match_table = of_match_ptr(cs89x0_match),
},
.remove_new = cs89x0_platform_remove,
.remove = cs89x0_platform_remove,
};

module_platform_driver_probe(cs89x0_driver, cs89x0_platform_probe);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/cirrus/ep93xx_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ MODULE_DEVICE_TABLE(of, ep93xx_eth_of_ids);

static struct platform_driver ep93xx_eth_driver = {
.probe = ep93xx_eth_probe,
.remove_new = ep93xx_eth_remove,
.remove = ep93xx_eth_remove,
.driver = {
.name = "ep93xx-eth",
.of_match_table = ep93xx_eth_of_ids,
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/cirrus/mac89x0.c
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ static void mac89x0_device_remove(struct platform_device *pdev)

static struct platform_driver mac89x0_platform_driver = {
.probe = mac89x0_device_probe,
.remove_new = mac89x0_device_remove,
.remove = mac89x0_device_remove,
.driver = {
.name = "mac89x0",
},
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ethernet/cortina/gemini.c
Original file line number Diff line number Diff line change
Expand Up @@ -2573,7 +2573,7 @@ static struct platform_driver gemini_ethernet_port_driver = {
.of_match_table = gemini_ethernet_port_of_match,
},
.probe = gemini_ethernet_port_probe,
.remove_new = gemini_ethernet_port_remove,
.remove = gemini_ethernet_port_remove,
};

static int gemini_ethernet_probe(struct platform_device *pdev)
Expand Down Expand Up @@ -2637,7 +2637,7 @@ static struct platform_driver gemini_ethernet_driver = {
.of_match_table = gemini_ethernet_of_match,
},
.probe = gemini_ethernet_probe,
.remove_new = gemini_ethernet_remove,
.remove = gemini_ethernet_remove,
};

static int __init gemini_ethernet_module_init(void)
Expand Down
Loading

0 comments on commit d521db3

Please sign in to comment.