net: dsa: Switch back to struct platform_driver::remove()
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Thu, 3 Oct 2024 10:01:04 +0000 (12:01 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 4 Oct 2024 23:39:57 +0000 (16:39 -0700)
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>
14 files changed:
drivers/net/dsa/b53/b53_mmap.c
drivers/net/dsa/b53/b53_srab.c
drivers/net/dsa/bcm_sf2.c
drivers/net/dsa/hirschmann/hellcreek.c
drivers/net/dsa/lantiq_gswip.c
drivers/net/dsa/mt7530-mmio.c
drivers/net/dsa/ocelot/ocelot_ext.c
drivers/net/dsa/ocelot/seville_vsc9953.c
drivers/net/dsa/realtek/realtek-mdio.c
drivers/net/dsa/realtek/realtek-smi.c
drivers/net/dsa/realtek/rtl8365mb.c
drivers/net/dsa/realtek/rtl8366rb.c
drivers/net/dsa/rzn1_a5psw.c
drivers/net/dsa/vitesse-vsc73xx-platform.c

index 3a89349dc918d454b7588bc03a7d3804870e96ed..c687360a5b7f11a838044e28aa06bafe6de1d782 100644 (file)
@@ -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",
index f3f95332ff17eca19a5492de9e70e5070c0a796b..b9939bbd2cd5175f1c596abce133a6cd25836178 100644 (file)
@@ -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",
index 3ae794a30acee9e65758f8607915ed409870ac79..9201f07839ad0805decea4096f697797b9dfa5fd 100644 (file)
@@ -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",
index beda1e9d350fb56337aa200f04530c6b31ff7969..d798f17cf7ea1b66cfdc9d77fd0187cb8f8a0fe4 100644 (file)
@@ -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",
index fcd4505f49252fcd4a9052200fc86415e26083ee..6eb3140d40444900ca9064620158a6a86dbb5328 100644 (file)
@@ -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",
index 10dc49961f15d7d50a9e6a907b916f8fecb952d3..5f2db4317dd3ba4771e457bca1a31c3f79fc5742 100644 (file)
@@ -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",
index 5632a7248cd41777b52ae04d1799b20214397112..450bda18ef37d9295542c0ba1ede56a9fc84c633 100644 (file)
@@ -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);
index 70782649c3957625e367133b251f5c72eb17bc6d..eb3944ba2a7279d18a2b648fa352b74176974ce5 100644 (file)
@@ -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",
index 04b758e5a680ac1f8bd3416e1d765aae6cfd3893..5f545dda702b7305e619642411364e0cebaaa669 100644 (file)
@@ -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.
index 88590ae95a75c5bdfb7530f7fc233bcb27686cde..d750bddf27b446fe7f8afb00661901205d066ef5 100644 (file)
@@ -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.
index ad7044b295ec1a6ea9c2a687c8c23410503cc033..6b9dbdb009412baac34657be7888070c2342aafb 100644 (file)
@@ -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,
 };
 
index c7a8cd060587814bd0cccb7fc1d176970fdc5458..6ba03f81c8824966cc51d5755731d8f6a8a0c289 100644 (file)
@@ -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,
 };
 
index 92e032972b34b7436ebc28163da89f2736971fe1..1135a32e4b7e94d6c45279a6db50a16c1f3acd45 100644 (file)
@@ -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);
index 755b7895a15a9dd7d0e34022940c518cb2f6fc6e..7a2e0a619b85adf4fb694fbe320c6487de4dfc07 100644 (file)
@@ -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",