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 0df3a2a..643ee6d 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 e598942..8f730ad 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 3f87053..19c93b9 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 d1aec2c..70edc52 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 a9916fd..281687d 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 dad23b4..4c810d8 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 11976a8..2a9132d 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 3373d3e..a16bfa9 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 37f2499..b23944a 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 03e7701..ba2ce77 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 e87b4d3..5d630af 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 63a7e5e..1c702d0 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 b857235..2653a9f 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 7e512c0..362f851 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 45f5d66..a5a5cfa 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 a09014c..bbeb7ff 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 c5565b2..bb07a99 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;