net: stmmac: rename stmmac_pltfr_remove_no_dt to stmmac_pltfr_remove
authorJisheng Zhang <jszhang@kernel.org>
Sat, 16 Sep 2023 07:58:28 +0000 (15:58 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 Sep 2023 11:44:36 +0000 (12:44 +0100)
Now, all users of the old stmmac_pltfr_remove() are converted to the
devres helper, it's time to rename stmmac_pltfr_remove_no_dt() back to
stmmac_pltfr_remove() and remove the old stmmac_pltfr_remove().

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 files changed:
drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c
drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c
drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c
drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c
drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
drivers/net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c
drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c
drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c
drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c
drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c
drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h

index 0df3a2ad0986972f38f63922e47d6660881f7c0e..643ee6d8d4dd5a8be89e4901c2b20cca919e12b1 100644 (file)
@@ -135,7 +135,7 @@ MODULE_DEVICE_TABLE(of, anarion_dwmac_match);
 
 static struct platform_driver anarion_dwmac_driver = {
        .probe  = anarion_dwmac_probe,
-       .remove_new = stmmac_pltfr_remove_no_dt,
+       .remove_new = stmmac_pltfr_remove,
        .driver = {
                .name           = "anarion-dwmac",
                .pm             = &stmmac_pltfr_pm_ops,
index e5989424894b4471433b5bd94ae5d64490028a21..8f730ada71f91d70b5c1d2707601b927f20aeb79 100644 (file)
@@ -418,7 +418,7 @@ MODULE_DEVICE_TABLE(of, imx_dwmac_match);
 
 static struct platform_driver imx_dwmac_driver = {
        .probe  = imx_dwmac_probe,
-       .remove_new = stmmac_pltfr_remove_no_dt,
+       .remove_new = stmmac_pltfr_remove,
        .driver = {
                .name           = "imx-dwmac",
                .pm             = &stmmac_pltfr_pm_ops,
index 3f87053ffc07e7b90ff2f1c5bcc9baedee490987..19c93b998fb31620f06ecb1391deba158bc9f86b 100644 (file)
@@ -370,7 +370,7 @@ MODULE_DEVICE_TABLE(of, ingenic_mac_of_matches);
 
 static struct platform_driver ingenic_mac_driver = {
        .probe          = ingenic_mac_probe,
-       .remove_new     = stmmac_pltfr_remove_no_dt,
+       .remove_new     = stmmac_pltfr_remove,
        .driver         = {
                .name   = "ingenic-mac",
                .pm             = pm_ptr(&ingenic_mac_pm_ops),
index d1aec2ca2b429aa32ec896280ceff788b40f3a8b..70edc5232379f30dca4b826d8604dbe985d0df54 100644 (file)
@@ -164,7 +164,7 @@ static void intel_eth_plat_remove(struct platform_device *pdev)
 {
        struct intel_dwmac *dwmac = get_stmmac_bsp_priv(&pdev->dev);
 
-       stmmac_pltfr_remove_no_dt(pdev);
+       stmmac_pltfr_remove(pdev);
        clk_disable_unprepare(dwmac->tx_clk);
 }
 
index a9916fd07616fcbafea1d0ccc87186e9c03e06e9..281687d7083bd47415ecd94ddd947d5bfba66f4a 100644 (file)
@@ -487,7 +487,7 @@ MODULE_DEVICE_TABLE(of, ipq806x_gmac_dwmac_match);
 
 static struct platform_driver ipq806x_gmac_dwmac_driver = {
        .probe = ipq806x_gmac_probe,
-       .remove_new = stmmac_pltfr_remove_no_dt,
+       .remove_new = stmmac_pltfr_remove,
        .driver = {
                .name           = "ipq806x-gmac-dwmac",
                .pm             = &stmmac_pltfr_pm_ops,
index dad23b47f383721affeac6ed850260aca497bfce..4c810d8f5bea4d3b7d5ce949bdbeb631afee5e7d 100644 (file)
@@ -72,7 +72,7 @@ MODULE_DEVICE_TABLE(of, lpc18xx_dwmac_match);
 
 static struct platform_driver lpc18xx_dwmac_driver = {
        .probe  = lpc18xx_dwmac_probe,
-       .remove_new = stmmac_pltfr_remove_no_dt,
+       .remove_new = stmmac_pltfr_remove,
        .driver = {
                .name           = "lpc18xx-dwmac",
                .pm             = &stmmac_pltfr_pm_ops,
index 11976a854240f02369bc82aa2012fcedb32e01fa..2a9132d6d743ceb213ab30f21b5f59df9d47fbdb 100644 (file)
@@ -683,7 +683,7 @@ static void mediatek_dwmac_remove(struct platform_device *pdev)
 {
        struct mediatek_dwmac_plat_data *priv_plat = get_stmmac_bsp_priv(&pdev->dev);
 
-       stmmac_pltfr_remove_no_dt(pdev);
+       stmmac_pltfr_remove(pdev);
        mediatek_dwmac_clks_config(priv_plat, false);
 }
 
index 3373d3ec23685bd2f22b61979de89566e58b6efe..a16bfa9089ea765b160e4dfbe14f0a127d4f172e 100644 (file)
@@ -78,7 +78,7 @@ MODULE_DEVICE_TABLE(of, meson6_dwmac_match);
 
 static struct platform_driver meson6_dwmac_driver = {
        .probe  = meson6_dwmac_probe,
-       .remove_new = stmmac_pltfr_remove_no_dt,
+       .remove_new = stmmac_pltfr_remove,
        .driver = {
                .name           = "meson6-dwmac",
                .pm             = &stmmac_pltfr_pm_ops,
index 37f249980929f980f0dec10cfd66159f9a0b1fd9..b23944aa344e1835f469d0410a02cbf6bf7a2200 100644 (file)
@@ -520,7 +520,7 @@ MODULE_DEVICE_TABLE(of, meson8b_dwmac_match);
 
 static struct platform_driver meson8b_dwmac_driver = {
        .probe  = meson8b_dwmac_probe,
-       .remove_new = stmmac_pltfr_remove_no_dt,
+       .remove_new = stmmac_pltfr_remove,
        .driver = {
                .name           = "meson8b-dwmac",
                .pm             = &stmmac_pltfr_pm_ops,
index 03e7701d01867dff6ac2b2fadb302fe0e75d4a4b..ba2ce776bd4df02da12f131b530f3a2cda3d7b92 100644 (file)
@@ -500,7 +500,7 @@ static void socfpga_dwmac_remove(struct platform_device *pdev)
        struct stmmac_priv *priv = netdev_priv(ndev);
        struct phylink_pcs *pcs = priv->hw->lynx_pcs;
 
-       stmmac_pltfr_remove_no_dt(pdev);
+       stmmac_pltfr_remove(pdev);
 
        lynx_pcs_destroy(pcs);
 }
index e87b4d335c725236576dbbcb296f37da9dbdf93c..5d630affb4d15a28189427df63dedbb3cb578498 100644 (file)
@@ -152,7 +152,7 @@ MODULE_DEVICE_TABLE(of, starfive_dwmac_match);
 
 static struct platform_driver starfive_dwmac_driver = {
        .probe  = starfive_dwmac_probe,
-       .remove_new = stmmac_pltfr_remove_no_dt,
+       .remove_new = stmmac_pltfr_remove,
        .driver = {
                .name = "starfive-dwmac",
                .pm = &stmmac_pltfr_pm_ops,
index 63a7e5e53d7b653b26223b9fccbe121fa6bf6fc0..1c702d0b2d2999006b550605070b4981a5e9d0f7 100644 (file)
@@ -1312,7 +1312,7 @@ static void sun8i_dwmac_remove(struct platform_device *pdev)
                clk_put(gmac->ephy_clk);
        }
 
-       stmmac_pltfr_remove_no_dt(pdev);
+       stmmac_pltfr_remove(pdev);
        sun8i_dwmac_unset_syscon(gmac);
 }
 
index b857235f5b1fc3332a4dff000891e4ebf0bea35b..2653a9f0958c964017c1c2b19d3105ebee3afe69 100644 (file)
@@ -172,7 +172,7 @@ MODULE_DEVICE_TABLE(of, sun7i_dwmac_match);
 
 static struct platform_driver sun7i_dwmac_driver = {
        .probe  = sun7i_gmac_probe,
-       .remove_new = stmmac_pltfr_remove_no_dt,
+       .remove_new = stmmac_pltfr_remove,
        .driver = {
                .name           = "sun7i-dwmac",
                .pm             = &stmmac_pltfr_pm_ops,
index 7e512c0762ea88c8a222aad8ccf3ed90e918aa9b..362f85136c3efe3dbef1037c3d993b3ef8ec5117 100644 (file)
@@ -358,7 +358,7 @@ static void tegra_mgbe_remove(struct platform_device *pdev)
 
        clk_bulk_disable_unprepare(ARRAY_SIZE(mgbe_clks), mgbe->clks);
 
-       stmmac_pltfr_remove_no_dt(pdev);
+       stmmac_pltfr_remove(pdev);
 }
 
 static const struct of_device_id tegra_mgbe_match[] = {
index 45f5d66a11c268861fd4ddb8f429d84b7c63bc5b..a5a5cfa989c6e7dc1905709f2e3005bb15269a56 100644 (file)
@@ -256,8 +256,7 @@ remove:
 
 static void visconti_eth_dwmac_remove(struct platform_device *pdev)
 {
-       stmmac_pltfr_remove_no_dt(pdev);
-
+       stmmac_pltfr_remove(pdev);
        visconti_eth_clock_remove(pdev);
 }
 
index a09014c9e7d0ae2d3c991bf1bcd3257c6a103afb..bbeb7ff372742e78024415afe83d8aeac90b2234 100644 (file)
@@ -810,7 +810,7 @@ static void devm_stmmac_pltfr_remove(void *data)
 {
        struct platform_device *pdev = data;
 
-       stmmac_pltfr_remove_no_dt(pdev);
+       stmmac_pltfr_remove(pdev);
 }
 
 /**
@@ -837,12 +837,12 @@ int devm_stmmac_pltfr_probe(struct platform_device *pdev,
 EXPORT_SYMBOL_GPL(devm_stmmac_pltfr_probe);
 
 /**
- * stmmac_pltfr_remove_no_dt
+ * stmmac_pltfr_remove
  * @pdev: pointer to the platform device
  * Description: This undoes the effects of stmmac_pltfr_probe() by removing the
  * driver and calling the platform's exit() callback.
  */
-void stmmac_pltfr_remove_no_dt(struct platform_device *pdev)
+void stmmac_pltfr_remove(struct platform_device *pdev)
 {
        struct net_device *ndev = platform_get_drvdata(pdev);
        struct stmmac_priv *priv = netdev_priv(ndev);
@@ -851,23 +851,6 @@ void stmmac_pltfr_remove_no_dt(struct platform_device *pdev)
        stmmac_dvr_remove(&pdev->dev);
        stmmac_pltfr_exit(pdev, plat);
 }
-EXPORT_SYMBOL_GPL(stmmac_pltfr_remove_no_dt);
-
-/**
- * stmmac_pltfr_remove
- * @pdev: platform device pointer
- * Description: this function calls the main to free the net resources
- * and calls the platforms hook and release the resources (e.g. mem).
- */
-void stmmac_pltfr_remove(struct platform_device *pdev)
-{
-       struct net_device *ndev = platform_get_drvdata(pdev);
-       struct stmmac_priv *priv = netdev_priv(ndev);
-       struct plat_stmmacenet_data *plat = priv->plat;
-
-       stmmac_pltfr_remove_no_dt(pdev);
-       stmmac_remove_config_dt(pdev, plat);
-}
 EXPORT_SYMBOL_GPL(stmmac_pltfr_remove);
 
 /**
index c5565b2a70acc611242f47ac2f5c8681d6d8887a..bb07a99e1248b91e2fd0e2e6ae4726083f78fb7a 100644 (file)
@@ -32,7 +32,6 @@ int stmmac_pltfr_probe(struct platform_device *pdev,
 int devm_stmmac_pltfr_probe(struct platform_device *pdev,
                            struct plat_stmmacenet_data *plat,
                            struct stmmac_resources *res);
-void stmmac_pltfr_remove_no_dt(struct platform_device *pdev);
 void stmmac_pltfr_remove(struct platform_device *pdev);
 extern const struct dev_pm_ops stmmac_pltfr_pm_ops;