[openwrt/openwrt] bmips: convert driver to .remove_new

LEDE Commits lede-commits at lists.infradead.org
Tue Apr 22 10:22:30 PDT 2025


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/559ca4eaa55a2d44c6d3a2a039f21d81340f314f

commit 559ca4eaa55a2d44c6d3a2a039f21d81340f314f
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Sat Apr 19 12:17:41 2025 +0200

    bmips: convert driver to .remove_new
    
    Convert driver to .remove_new in preparation for kernel 6.12 support.
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
    Link: https://github.com/openwrt/openwrt/pull/18535
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../linux/bmips/files/drivers/net/ethernet/broadcom/bcm6348-enet.c  | 6 ++----
 .../bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c      | 6 ++----
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6348-enet.c b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6348-enet.c
index 5e5259a492..c753918e93 100644
--- a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6348-enet.c
+++ b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6348-enet.c
@@ -1675,7 +1675,7 @@ out_disable_clk:
 	return ret;
 }
 
-static int bcm6348_emac_remove(struct platform_device *pdev)
+static void bcm6348_emac_remove(struct platform_device *pdev)
 {
 	struct net_device *ndev = platform_get_drvdata(pdev);
 	struct bcm6348_emac *emac = netdev_priv(ndev);
@@ -1688,8 +1688,6 @@ static int bcm6348_emac_remove(struct platform_device *pdev)
 
 	for (i = 0; i < emac->num_clocks; i++)
 		clk_disable_unprepare(emac->clock[i]);
-
-	return 0;
 }
 
 static const struct of_device_id bcm6348_emac_of_match[] = {
@@ -1706,7 +1704,7 @@ static struct platform_driver bcm6348_emac_driver = {
 		.of_match_table = of_match_ptr(bcm6348_emac_of_match),
 	},
 	.probe	= bcm6348_emac_probe,
-	.remove	= bcm6348_emac_remove,
+	.remove_new	= bcm6348_emac_remove,
 };
 
 int bcm6348_iudma_drivers_register(struct platform_device *pdev)
diff --git a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c
index 7031a74490..456a7f393e 100644
--- a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c
+++ b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c
@@ -1100,7 +1100,7 @@ out_disable_clk:
 	return ret;
 }
 
-static int bcm6368_enetsw_remove(struct platform_device *pdev)
+static void bcm6368_enetsw_remove(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct net_device *ndev = platform_get_drvdata(pdev);
@@ -1118,8 +1118,6 @@ static int bcm6368_enetsw_remove(struct platform_device *pdev)
 
 	for (i = 0; i < priv->num_clocks; i++)
 		clk_disable_unprepare(priv->clock[i]);
-
-	return 0;
 }
 
 static const struct of_device_id bcm6368_enetsw_of_match[] = {
@@ -1138,7 +1136,7 @@ static struct platform_driver bcm6368_enetsw_driver = {
 		.of_match_table = of_match_ptr(bcm6368_enetsw_of_match),
 	},
 	.probe	= bcm6368_enetsw_probe,
-	.remove	= bcm6368_enetsw_remove,
+	.remove_new	= bcm6368_enetsw_remove,
 };
 module_platform_driver(bcm6368_enetsw_driver);
 




More information about the lede-commits mailing list