Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

After commit 0edb555a65d1 ("platform: Make platform_driver::remove()
return void") .remove() is (again) the right callback to implement for
platform drivers.

Convert all platform drivers below drivers/net/dsa to use .remove(),
with the eventual goal to drop struct platform_driver::remove_new(). As
.remove() and .remove_new() have the same prototypes, conversion is done
by just changing the structure member name in the driver initializer.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/36da477cb9fa0bffec32d50c2cf3d18e94a0e7e3.1727949050.git.u.kleine-koenig@baylibre.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Uwe Kleine-König and committed by
Jakub Kicinski
4818016d e96321fa

+14 -14
+1 -1
drivers/net/dsa/b53/b53_mmap.c
··· 370 370 371 371 static struct platform_driver b53_mmap_driver = { 372 372 .probe = b53_mmap_probe, 373 - .remove_new = b53_mmap_remove, 373 + .remove = b53_mmap_remove, 374 374 .shutdown = b53_mmap_shutdown, 375 375 .driver = { 376 376 .name = "b53-switch",
+1 -1
drivers/net/dsa/b53/b53_srab.c
··· 682 682 683 683 static struct platform_driver b53_srab_driver = { 684 684 .probe = b53_srab_probe, 685 - .remove_new = b53_srab_remove, 685 + .remove = b53_srab_remove, 686 686 .shutdown = b53_srab_shutdown, 687 687 .driver = { 688 688 .name = "b53-srab-switch",
+1 -1
drivers/net/dsa/bcm_sf2.c
··· 1623 1623 1624 1624 static struct platform_driver bcm_sf2_driver = { 1625 1625 .probe = bcm_sf2_sw_probe, 1626 - .remove_new = bcm_sf2_sw_remove, 1626 + .remove = bcm_sf2_sw_remove, 1627 1627 .shutdown = bcm_sf2_sw_shutdown, 1628 1628 .driver = { 1629 1629 .name = "brcm-sf2",
+1 -1
drivers/net/dsa/hirschmann/hellcreek.c
··· 2105 2105 2106 2106 static struct platform_driver hellcreek_driver = { 2107 2107 .probe = hellcreek_probe, 2108 - .remove_new = hellcreek_remove, 2108 + .remove = hellcreek_remove, 2109 2109 .shutdown = hellcreek_shutdown, 2110 2110 .driver = { 2111 2111 .name = "hellcreek",
+1 -1
drivers/net/dsa/lantiq_gswip.c
··· 2249 2249 2250 2250 static struct platform_driver gswip_driver = { 2251 2251 .probe = gswip_probe, 2252 - .remove_new = gswip_remove, 2252 + .remove = gswip_remove, 2253 2253 .shutdown = gswip_shutdown, 2254 2254 .driver = { 2255 2255 .name = "gswip",
+1 -1
drivers/net/dsa/mt7530-mmio.c
··· 86 86 87 87 static struct platform_driver mt7988_platform_driver = { 88 88 .probe = mt7988_probe, 89 - .remove_new = mt7988_remove, 89 + .remove = mt7988_remove, 90 90 .shutdown = mt7988_shutdown, 91 91 .driver = { 92 92 .name = "mt7530-mmio",
+1 -1
drivers/net/dsa/ocelot/ocelot_ext.c
··· 102 102 .of_match_table = ocelot_ext_switch_of_match, 103 103 }, 104 104 .probe = ocelot_ext_probe, 105 - .remove_new = ocelot_ext_remove, 105 + .remove = ocelot_ext_remove, 106 106 .shutdown = ocelot_ext_shutdown, 107 107 }; 108 108 module_platform_driver(ocelot_ext_switch_driver);
+1 -1
drivers/net/dsa/ocelot/seville_vsc9953.c
··· 1014 1014 1015 1015 static struct platform_driver seville_vsc9953_driver = { 1016 1016 .probe = seville_probe, 1017 - .remove_new = seville_remove, 1017 + .remove = seville_remove, 1018 1018 .shutdown = seville_shutdown, 1019 1019 .driver = { 1020 1020 .name = "mscc_seville",
+1 -1
drivers/net/dsa/realtek/realtek-mdio.c
··· 146 146 * realtek_mdio_remove() - Remove the driver of an MDIO-connected switch 147 147 * @mdiodev: mdio_device to be removed. 148 148 * 149 - * This function should be used as the .remove_new in an mdio_driver. First 149 + * This function should be used as the .remove in an mdio_driver. First 150 150 * it unregisters the DSA switch and then it calls the common remove function. 151 151 * 152 152 * Context: Can sleep.
+1 -1
drivers/net/dsa/realtek/realtek-smi.c
··· 367 367 * realtek_smi_remove() - Remove the driver of a SMI-connected switch 368 368 * @pdev: platform_device to be removed. 369 369 * 370 - * This function should be used as the .remove_new in a platform_driver. First 370 + * This function should be used as the .remove in a platform_driver. First 371 371 * it unregisters the DSA switch and then it calls the common remove function. 372 372 * 373 373 * Context: Can sleep.
+1 -1
drivers/net/dsa/realtek/rtl8365mb.c
··· 2164 2164 .of_match_table = rtl8365mb_of_match, 2165 2165 }, 2166 2166 .probe = realtek_smi_probe, 2167 - .remove_new = realtek_smi_remove, 2167 + .remove = realtek_smi_remove, 2168 2168 .shutdown = realtek_smi_shutdown, 2169 2169 }; 2170 2170
+1 -1
drivers/net/dsa/realtek/rtl8366rb.c
··· 2102 2102 .of_match_table = rtl8366rb_of_match, 2103 2103 }, 2104 2104 .probe = realtek_smi_probe, 2105 - .remove_new = realtek_smi_remove, 2105 + .remove = realtek_smi_remove, 2106 2106 .shutdown = realtek_smi_shutdown, 2107 2107 }; 2108 2108
+1 -1
drivers/net/dsa/rzn1_a5psw.c
··· 1324 1324 .of_match_table = a5psw_of_mtable, 1325 1325 }, 1326 1326 .probe = a5psw_probe, 1327 - .remove_new = a5psw_remove, 1327 + .remove = a5psw_remove, 1328 1328 .shutdown = a5psw_shutdown, 1329 1329 }; 1330 1330 module_platform_driver(a5psw_driver);
+1 -1
drivers/net/dsa/vitesse-vsc73xx-platform.c
··· 158 158 159 159 static struct platform_driver vsc73xx_platform_driver = { 160 160 .probe = vsc73xx_platform_probe, 161 - .remove_new = vsc73xx_platform_remove, 161 + .remove = vsc73xx_platform_remove, 162 162 .shutdown = vsc73xx_platform_shutdown, 163 163 .driver = { 164 164 .name = "vsc73xx-platform",