phy: Switch back to struct platform_driver::remove()
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Wed, 9 Oct 2024 06:53:07 +0000 (08:53 +0200)
committerVinod Koul <vkoul@kernel.org>
Thu, 17 Oct 2024 15:03:03 +0000 (20:33 +0530)
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/phy/ 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.

While touching these files, make indention of the struct initializer
consistent in several files.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/20241009065307.504930-2-u.kleine-koenig@baylibre.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
35 files changed:
drivers/phy/allwinner/phy-sun4i-usb.c
drivers/phy/broadcom/phy-brcm-usb.c
drivers/phy/cadence/cdns-dphy.c
drivers/phy/cadence/phy-cadence-sierra.c
drivers/phy/cadence/phy-cadence-torrent.c
drivers/phy/freescale/phy-fsl-imx8qm-lvds-phy.c
drivers/phy/freescale/phy-fsl-lynx-28g.c
drivers/phy/freescale/phy-fsl-samsung-hdmi.c
drivers/phy/intel/phy-intel-lgm-combo.c
drivers/phy/motorola/phy-cpcap-usb.c
drivers/phy/motorola/phy-mapphone-mdm6600.c
drivers/phy/phy-lgm-usb.c
drivers/phy/qualcomm/phy-qcom-apq8064-sata.c
drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c
drivers/phy/qualcomm/phy-qcom-ipq806x-sata.c
drivers/phy/realtek/phy-rtk-usb2.c
drivers/phy/realtek/phy-rtk-usb3.c
drivers/phy/renesas/phy-rcar-gen3-pcie.c
drivers/phy/renesas/phy-rcar-gen3-usb2.c
drivers/phy/renesas/phy-rcar-gen3-usb3.c
drivers/phy/renesas/r8a779f0-ether-serdes.c
drivers/phy/rockchip/phy-rockchip-inno-csidphy.c
drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
drivers/phy/rockchip/phy-rockchip-inno-hdmi.c
drivers/phy/rockchip/phy-rockchip-typec.c
drivers/phy/st/phy-stm32-usbphyc.c
drivers/phy/tegra/xusb.c
drivers/phy/ti/phy-am654-serdes.c
drivers/phy/ti/phy-da8xx-usb.c
drivers/phy/ti/phy-dm816x-usb.c
drivers/phy/ti/phy-j721e-wiz.c
drivers/phy/ti/phy-omap-usb2.c
drivers/phy/ti/phy-ti-pipe3.c
drivers/phy/ti/phy-twl4030-usb.c
drivers/phy/xilinx/phy-zynqmp.c

index b0f19e9..cd159a7 100644 (file)
@@ -1049,11 +1049,11 @@ static const struct of_device_id sun4i_usb_phy_of_match[] = {
 MODULE_DEVICE_TABLE(of, sun4i_usb_phy_of_match);
 
 static struct platform_driver sun4i_usb_phy_driver = {
-       .probe  = sun4i_usb_phy_probe,
-       .remove_new = sun4i_usb_phy_remove,
+       .probe = sun4i_usb_phy_probe,
+       .remove = sun4i_usb_phy_remove,
        .driver = {
-               .of_match_table = sun4i_usb_phy_of_match,
-               .name  = "sun4i-usb-phy",
+               .of_match_table= sun4i_usb_phy_of_match,
+               .name = "sun4i-usb-phy",
        }
 };
 module_platform_driver(sun4i_usb_phy_driver);
index ad2eec0..6362ca5 100644 (file)
@@ -667,7 +667,7 @@ MODULE_DEVICE_TABLE(of, brcm_usb_dt_ids);
 
 static struct platform_driver brcm_usb_driver = {
        .probe          = brcm_usb_phy_probe,
-       .remove_new     = brcm_usb_phy_remove,
+       .remove         = brcm_usb_phy_remove,
        .driver         = {
                .name   = "brcmstb-usb-phy",
                .pm = &brcm_usb_phy_pm_ops,
index dddb66d..ed87a39 100644 (file)
@@ -472,7 +472,7 @@ MODULE_DEVICE_TABLE(of, cdns_dphy_of_match);
 
 static struct platform_driver cdns_dphy_platform_driver = {
        .probe          = cdns_dphy_probe,
-       .remove_new     = cdns_dphy_remove,
+       .remove         = cdns_dphy_remove,
        .driver         = {
                .name           = "cdns-mipi-dphy",
                .of_match_table = cdns_dphy_of_match,
index aeec6eb..e739d9d 100644 (file)
@@ -2730,7 +2730,7 @@ MODULE_DEVICE_TABLE(of, cdns_sierra_id_table);
 
 static struct platform_driver cdns_sierra_driver = {
        .probe          = cdns_sierra_phy_probe,
-       .remove_new     = cdns_sierra_phy_remove,
+       .remove         = cdns_sierra_phy_remove,
        .driver         = {
                .name   = "cdns-sierra-phy",
                .of_match_table = cdns_sierra_id_table,
index 8bbbbb8..a281c0d 100644 (file)
@@ -5440,8 +5440,8 @@ MODULE_DEVICE_TABLE(of, cdns_torrent_phy_of_match);
 
 static struct platform_driver cdns_torrent_phy_driver = {
        .probe  = cdns_torrent_phy_probe,
-       .remove_new = cdns_torrent_phy_remove,
-       .driver = {
+       .remove = cdns_torrent_phy_remove,
+       .driver = {
                .name   = "cdns-torrent-phy",
                .of_match_table = cdns_torrent_phy_of_match,
                .pm     = pm_sleep_ptr(&cdns_torrent_phy_pm_ops),
index 38388dd..7aef2f5 100644 (file)
@@ -433,12 +433,12 @@ static const struct of_device_id mixel_lvds_phy_of_match[] = {
 MODULE_DEVICE_TABLE(of, mixel_lvds_phy_of_match);
 
 static struct platform_driver mixel_lvds_phy_driver = {
-       .probe  = mixel_lvds_phy_probe,
-       .remove_new = mixel_lvds_phy_remove,
+       .probe = mixel_lvds_phy_probe,
+       .remove = mixel_lvds_phy_remove,
        .driver = {
                .pm = &mixel_lvds_phy_pm_ops,
                .name = "mixel-lvds-phy",
-               .of_match_table = mixel_lvds_phy_of_match,
+               .of_match_table = mixel_lvds_phy_of_match,
        }
 };
 module_platform_driver(mixel_lvds_phy_driver);
index b86da8e..f7994e8 100644 (file)
@@ -631,9 +631,9 @@ static const struct of_device_id lynx_28g_of_match_table[] = {
 MODULE_DEVICE_TABLE(of, lynx_28g_of_match_table);
 
 static struct platform_driver lynx_28g_driver = {
-       .probe  = lynx_28g_probe,
-       .remove_new = lynx_28g_remove,
-       .driver = {
+       .probe = lynx_28g_probe,
+       .remove = lynx_28g_remove,
+       .driver = {
                .name = "lynx-28g",
                .of_match_table = lynx_28g_of_match_table,
        },
index a08c1bf..2c80388 100644 (file)
@@ -749,8 +749,8 @@ static const struct of_device_id fsl_samsung_hdmi_phy_of_match[] = {
 MODULE_DEVICE_TABLE(of, fsl_samsung_hdmi_phy_of_match);
 
 static struct platform_driver fsl_samsung_hdmi_phy_driver = {
-       .probe  = fsl_samsung_hdmi_phy_probe,
-       .remove_new = fsl_samsung_hdmi_phy_remove,
+       .probe = fsl_samsung_hdmi_phy_probe,
+       .remove = fsl_samsung_hdmi_phy_remove,
        .driver = {
                .name = "fsl-samsung-hdmi-phy",
                .of_match_table = fsl_samsung_hdmi_phy_of_match,
index f8e3054..9ee3cf6 100644 (file)
@@ -605,7 +605,7 @@ static const struct of_device_id of_intel_cbphy_match[] = {
 
 static struct platform_driver intel_cbphy_driver = {
        .probe = intel_cbphy_probe,
-       .remove_new = intel_cbphy_remove,
+       .remove = intel_cbphy_remove,
        .driver = {
                .name = "intel-combo-phy",
                .of_match_table = of_intel_cbphy_match,
index 7bbf729..7cb020d 100644 (file)
@@ -704,7 +704,7 @@ static void cpcap_usb_phy_remove(struct platform_device *pdev)
 
 static struct platform_driver cpcap_usb_phy_driver = {
        .probe          = cpcap_usb_phy_probe,
-       .remove_new     = cpcap_usb_phy_remove,
+       .remove         = cpcap_usb_phy_remove,
        .driver         = {
                .name   = "cpcap-usb-phy",
                .of_match_table = of_match_ptr(cpcap_usb_phy_id_table),
index 376d023..152344e 100644 (file)
@@ -655,7 +655,7 @@ static void phy_mdm6600_remove(struct platform_device *pdev)
 
 static struct platform_driver phy_mdm6600_driver = {
        .probe = phy_mdm6600_probe,
-       .remove_new = phy_mdm6600_remove,
+       .remove = phy_mdm6600_remove,
        .driver = {
                .name = "phy-mapphone-mdm6600",
                .pm = &phy_mdm6600_pm_ops,
index 410729c..eb7c6fe 100644 (file)
@@ -271,7 +271,7 @@ static struct platform_driver lgm_phy_driver = {
                .of_match_table = intel_usb_phy_dt_ids,
        },
        .probe = phy_probe,
-       .remove_new = phy_remove,
+       .remove = phy_remove,
 };
 
 module_platform_driver(lgm_phy_driver);
index 3642a5d..cae290a 100644 (file)
@@ -257,12 +257,12 @@ static const struct of_device_id qcom_apq8064_sata_phy_of_match[] = {
 MODULE_DEVICE_TABLE(of, qcom_apq8064_sata_phy_of_match);
 
 static struct platform_driver qcom_apq8064_sata_phy_driver = {
-       .probe  = qcom_apq8064_sata_phy_probe,
-       .remove_new = qcom_apq8064_sata_phy_remove,
+       .probe = qcom_apq8064_sata_phy_probe,
+       .remove = qcom_apq8064_sata_phy_remove,
        .driver = {
-               .name   = "qcom-apq8064-sata-phy",
-               .of_match_table = qcom_apq8064_sata_phy_of_match,
-       }
+               .name = "qcom-apq8064-sata-phy",
+               .of_match_table = qcom_apq8064_sata_phy_of_match,
+       },
 };
 module_platform_driver(qcom_apq8064_sata_phy_driver);
 
index 68cc8e2..6bd1b3c 100644 (file)
@@ -294,7 +294,7 @@ MODULE_DEVICE_TABLE(of, eusb2_repeater_of_match_table);
 
 static struct platform_driver eusb2_repeater_driver = {
        .probe          = eusb2_repeater_probe,
-       .remove_new     = eusb2_repeater_remove,
+       .remove         = eusb2_repeater_remove,
        .driver = {
                .name   = "qcom-eusb2-repeater",
                .of_match_table = eusb2_repeater_of_match_table,
index f0a72b8..f5eb0bd 100644 (file)
@@ -184,11 +184,11 @@ static const struct of_device_id qcom_ipq806x_sata_phy_of_match[] = {
 MODULE_DEVICE_TABLE(of, qcom_ipq806x_sata_phy_of_match);
 
 static struct platform_driver qcom_ipq806x_sata_phy_driver = {
-       .probe  = qcom_ipq806x_sata_phy_probe,
-       .remove_new = qcom_ipq806x_sata_phy_remove,
+       .probe = qcom_ipq806x_sata_phy_probe,
+       .remove = qcom_ipq806x_sata_phy_remove,
        .driver = {
-               .name   = "qcom-ipq806x-sata-phy",
-               .of_match_table = qcom_ipq806x_sata_phy_of_match,
+               .name = "qcom-ipq806x-sata-phy",
+               .of_match_table = qcom_ipq806x_sata_phy_of_match,
        }
 };
 module_platform_driver(qcom_ipq806x_sata_phy_driver);
index e3ad7ce..c3e131a 100644 (file)
@@ -1298,7 +1298,7 @@ MODULE_DEVICE_TABLE(of, usbphy_rtk_dt_match);
 
 static struct platform_driver rtk_usb2phy_driver = {
        .probe          = rtk_usb2phy_probe,
-       .remove_new     = rtk_usb2phy_remove,
+       .remove         = rtk_usb2phy_remove,
        .driver         = {
                .name   = "rtk-usb2phy",
                .of_match_table = usbphy_rtk_dt_match,
index dfcf4b9..0cef29a 100644 (file)
@@ -734,7 +734,7 @@ MODULE_DEVICE_TABLE(of, usbphy_rtk_dt_match);
 
 static struct platform_driver rtk_usb3phy_driver = {
        .probe          = rtk_usb3phy_probe,
-       .remove_new     = rtk_usb3phy_remove,
+       .remove         = rtk_usb3phy_remove,
        .driver         = {
                .name   = "rtk-usb3phy",
                .of_match_table = usbphy_rtk_dt_match,
index 0ce7e9c..feca4cb 100644 (file)
@@ -132,11 +132,11 @@ static void rcar_gen3_phy_pcie_remove(struct platform_device *pdev)
 
 static struct platform_driver rcar_gen3_phy_driver = {
        .driver = {
-               .name           = "phy_rcar_gen3_pcie",
-               .of_match_table = rcar_gen3_phy_pcie_match_table,
+               .name = "phy_rcar_gen3_pcie",
+               .of_match_table = rcar_gen3_phy_pcie_match_table,
        },
-       .probe  = rcar_gen3_phy_pcie_probe,
-       .remove_new = rcar_gen3_phy_pcie_remove,
+       .probe = rcar_gen3_phy_pcie_probe,
+       .remove = rcar_gen3_phy_pcie_remove,
 };
 
 module_platform_driver(rcar_gen3_phy_driver);
index 58e1233..775f4f9 100644 (file)
@@ -825,7 +825,7 @@ static struct platform_driver rcar_gen3_phy_usb2_driver = {
                .of_match_table = rcar_gen3_phy_usb2_match_table,
        },
        .probe  = rcar_gen3_phy_usb2_probe,
-       .remove_new = rcar_gen3_phy_usb2_remove,
+       .remove = rcar_gen3_phy_usb2_remove,
 };
 module_platform_driver(rcar_gen3_phy_usb2_driver);
 
index e2d630e..5c267d1 100644 (file)
@@ -206,11 +206,11 @@ static void rcar_gen3_phy_usb3_remove(struct platform_device *pdev)
 
 static struct platform_driver rcar_gen3_phy_usb3_driver = {
        .driver = {
-               .name           = "phy_rcar_gen3_usb3",
-               .of_match_table = rcar_gen3_phy_usb3_match_table,
+               .name = "phy_rcar_gen3_usb3",
+               .of_match_table = rcar_gen3_phy_usb3_match_table,
        },
-       .probe  = rcar_gen3_phy_usb3_probe,
-       .remove_new = rcar_gen3_phy_usb3_remove,
+       .probe = rcar_gen3_phy_usb3_probe,
+       .remove = rcar_gen3_phy_usb3_remove,
 };
 module_platform_driver(rcar_gen3_phy_usb3_driver);
 
index f1f1da4..3b2d8ce 100644 (file)
@@ -404,7 +404,7 @@ static void r8a779f0_eth_serdes_remove(struct platform_device *pdev)
 
 static struct platform_driver r8a779f0_eth_serdes_driver_platform = {
        .probe = r8a779f0_eth_serdes_probe,
-       .remove_new = r8a779f0_eth_serdes_remove,
+       .remove = r8a779f0_eth_serdes_remove,
        .driver = {
                .name = "r8a779f0_eth_serdes",
                .of_match_table = r8a779f0_eth_serdes_of_table,
index 98c92d6..2ab99e1 100644 (file)
@@ -472,7 +472,7 @@ static struct platform_driver rockchip_inno_csidphy_driver = {
                .of_match_table = rockchip_inno_csidphy_match_id,
        },
        .probe = rockchip_inno_csidphy_probe,
-       .remove_new = rockchip_inno_csidphy_remove,
+       .remove = rockchip_inno_csidphy_remove,
 };
 
 module_platform_driver(rockchip_inno_csidphy_driver);
index 6405943..d5b1a4e 100644 (file)
@@ -784,7 +784,7 @@ static struct platform_driver inno_dsidphy_driver = {
                .of_match_table = of_match_ptr(inno_dsidphy_of_match),
        },
        .probe = inno_dsidphy_probe,
-       .remove_new = inno_dsidphy_remove,
+       .remove = inno_dsidphy_remove,
 };
 module_platform_driver(inno_dsidphy_driver);
 
index 053bd62..8dcc2bb 100644 (file)
@@ -1424,8 +1424,8 @@ static const struct of_device_id inno_hdmi_phy_of_match[] = {
 MODULE_DEVICE_TABLE(of, inno_hdmi_phy_of_match);
 
 static struct platform_driver inno_hdmi_phy_driver = {
-       .probe  = inno_hdmi_phy_probe,
-       .remove_new = inno_hdmi_phy_remove,
+       .probe = inno_hdmi_phy_probe,
+       .remove = inno_hdmi_phy_remove,
        .driver = {
                .name = "inno-hdmi-phy",
                .of_match_table = inno_hdmi_phy_of_match,
index 4efcb78..122ae0f 100644 (file)
@@ -1210,7 +1210,7 @@ MODULE_DEVICE_TABLE(of, rockchip_typec_phy_dt_ids);
 
 static struct platform_driver rockchip_typec_phy_driver = {
        .probe          = rockchip_typec_phy_probe,
-       .remove_new     = rockchip_typec_phy_remove,
+       .remove         = rockchip_typec_phy_remove,
        .driver         = {
                .name   = "rockchip-typec-phy",
                .of_match_table = rockchip_typec_phy_dt_ids,
index 9dbe60d..b917cd4 100644 (file)
@@ -812,7 +812,7 @@ MODULE_DEVICE_TABLE(of, stm32_usbphyc_of_match);
 
 static struct platform_driver stm32_usbphyc_driver = {
        .probe = stm32_usbphyc_probe,
-       .remove_new = stm32_usbphyc_remove,
+       .remove = stm32_usbphyc_remove,
        .driver = {
                .of_match_table = stm32_usbphyc_of_match,
                .name = "stm32-usbphyc",
index cfdb54b..480c1b5 100644 (file)
@@ -1325,7 +1325,7 @@ static struct platform_driver tegra_xusb_padctl_driver = {
                .pm = &tegra_xusb_padctl_pm_ops,
        },
        .probe = tegra_xusb_padctl_probe,
-       .remove_new = tegra_xusb_padctl_remove,
+       .remove = tegra_xusb_padctl_remove,
 };
 module_platform_driver(tegra_xusb_padctl_driver);
 
index 3bf3aff..431b223 100644 (file)
@@ -837,7 +837,7 @@ static void serdes_am654_remove(struct platform_device *pdev)
 
 static struct platform_driver serdes_am654_driver = {
        .probe          = serdes_am654_probe,
-       .remove_new     = serdes_am654_remove,
+       .remove         = serdes_am654_remove,
        .driver         = {
                .name   = "phy-am654",
                .of_match_table = serdes_am654_id_table,
index 68aa595..1d81a1e 100644 (file)
@@ -277,11 +277,11 @@ MODULE_DEVICE_TABLE(of, da8xx_usb_phy_ids);
 
 static struct platform_driver da8xx_usb_phy_driver = {
        .probe  = da8xx_usb_phy_probe,
-       .remove_new = da8xx_usb_phy_remove,
+       .remove = da8xx_usb_phy_remove,
        .driver = {
                .name   = "da8xx-usb-phy",
                .pm     = &da8xx_usb_phy_pm_ops,
-               .of_match_table = da8xx_usb_phy_ids,
+               .of_match_table = da8xx_usb_phy_ids,
        },
 };
 
index d5ae972..e8f842d 100644 (file)
@@ -259,7 +259,7 @@ static void dm816x_usb_phy_remove(struct platform_device *pdev)
 
 static struct platform_driver dm816x_usb_phy_driver = {
        .probe          = dm816x_usb_phy_probe,
-       .remove_new     = dm816x_usb_phy_remove,
+       .remove         = dm816x_usb_phy_remove,
        .driver         = {
                .name   = "dm816x-usb-phy",
                .pm     = &dm816x_usb_phy_pm_ops,
index a6c0c56..fd46dfe 100644 (file)
@@ -1685,7 +1685,7 @@ static DEFINE_NOIRQ_DEV_PM_OPS(wiz_pm_ops, NULL, wiz_resume_noirq);
 
 static struct platform_driver wiz_driver = {
        .probe          = wiz_probe,
-       .remove_new     = wiz_remove,
+       .remove         = wiz_remove,
        .driver         = {
                .name   = "wiz",
                .of_match_table = wiz_id_table,
index 78e19b1..c1a0ef9 100644 (file)
@@ -511,7 +511,7 @@ static void omap_usb2_remove(struct platform_device *pdev)
 
 static struct platform_driver omap_usb2_driver = {
        .probe          = omap_usb2_probe,
-       .remove_new     = omap_usb2_remove,
+       .remove         = omap_usb2_remove,
        .driver         = {
                .name   = "omap-usb2",
                .of_match_table = omap_usb2_id_table,
index 874c1a2..da2cbac 100644 (file)
@@ -920,7 +920,7 @@ MODULE_DEVICE_TABLE(of, ti_pipe3_id_table);
 
 static struct platform_driver ti_pipe3_driver = {
        .probe          = ti_pipe3_probe,
-       .remove_new     = ti_pipe3_remove,
+       .remove         = ti_pipe3_remove,
        .driver         = {
                .name   = "ti-pipe3",
                .of_match_table = ti_pipe3_id_table,
index 6b26599..6f12b38 100644 (file)
@@ -834,7 +834,7 @@ MODULE_DEVICE_TABLE(of, twl4030_usb_id_table);
 
 static struct platform_driver twl4030_usb_driver = {
        .probe          = twl4030_usb_probe,
-       .remove_new     = twl4030_usb_remove,
+       .remove         = twl4030_usb_remove,
        .driver         = {
                .name   = "twl4030_usb",
                .pm     = &twl4030_usb_pm_ops,
index e657900..05a4a59 100644 (file)
@@ -1071,7 +1071,7 @@ MODULE_DEVICE_TABLE(of, xpsgtr_of_match);
 
 static struct platform_driver xpsgtr_driver = {
        .probe = xpsgtr_probe,
-       .remove_new = xpsgtr_remove,
+       .remove = xpsgtr_remove,
        .driver = {
                .name = "xilinx-psgtr",
                .of_match_table = xpsgtr_of_match,