[openwrt/openwrt] ath79: convert driver to .remove_new
LEDE Commits
lede-commits at lists.infradead.org
Tue Apr 22 10:22:31 PDT 2025
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/45743a3637aa265e80f9049e0dfdf8d0dc4511da
commit 45743a3637aa265e80f9049e0dfdf8d0dc4511da
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Sat Apr 19 12:23:14 2025 +0200
ath79: 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>
---
target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c | 6 ++----
target/linux/ath79/files/drivers/mtd/nand/raw/nand_rb4xx.c | 6 ++----
target/linux/ath79/files/drivers/mtd/nand/raw/rb91x_nand.c | 6 ++----
.../drivers/net/ethernet/atheros/ag71xx/ag71xx_legacy_mdio.c | 5 ++---
.../ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c | 8 ++++----
5 files changed, 12 insertions(+), 19 deletions(-)
diff --git a/target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c b/target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c
index 029142ca61..c1670b61a5 100644
--- a/target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c
+++ b/target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c
@@ -1452,7 +1452,7 @@ err_free_buf:
return ret;
}
-static int ar934x_nfc_remove(struct platform_device *pdev)
+static void ar934x_nfc_remove(struct platform_device *pdev)
{
struct ar934x_nfc *nfc;
@@ -1462,8 +1462,6 @@ static int ar934x_nfc_remove(struct platform_device *pdev)
nand_cleanup(&nfc->nand_chip);
ar934x_nfc_free_buf(nfc);
}
-
- return 0;
}
static const struct of_device_id ar934x_nfc_match[] = {
@@ -1475,7 +1473,7 @@ MODULE_DEVICE_TABLE(of, ar934x_nfc_match);
static struct platform_driver ar934x_nfc_driver = {
.probe = ar934x_nfc_probe,
- .remove = ar934x_nfc_remove,
+ .remove_new = ar934x_nfc_remove,
.driver = {
.name = AR934X_NFC_DRIVER_NAME,
.of_match_table = ar934x_nfc_match,
diff --git a/target/linux/ath79/files/drivers/mtd/nand/raw/nand_rb4xx.c b/target/linux/ath79/files/drivers/mtd/nand/raw/nand_rb4xx.c
index e42631525c..51a6fa99c6 100644
--- a/target/linux/ath79/files/drivers/mtd/nand/raw/nand_rb4xx.c
+++ b/target/linux/ath79/files/drivers/mtd/nand/raw/nand_rb4xx.c
@@ -214,14 +214,12 @@ static int rb4xx_nand_probe(struct platform_device *pdev)
return 0;
}
-static int rb4xx_nand_remove(struct platform_device *pdev)
+static void rb4xx_nand_remove(struct platform_device *pdev)
{
struct rb4xx_nand *nand = platform_get_drvdata(pdev);
mtd_device_unregister(nand_to_mtd(&nand->chip));
nand_cleanup(&nand->chip);
-
- return 0;
}
static const struct platform_device_id rb4xx_nand_id_table[] = {
@@ -232,7 +230,7 @@ MODULE_DEVICE_TABLE(platform, rb4xx_nand_id_table);
static struct platform_driver rb4xx_nand_driver = {
.probe = rb4xx_nand_probe,
- .remove = rb4xx_nand_remove,
+ .remove_new = rb4xx_nand_remove,
.id_table = rb4xx_nand_id_table,
.driver = {
.name = "rb4xx-nand",
diff --git a/target/linux/ath79/files/drivers/mtd/nand/raw/rb91x_nand.c b/target/linux/ath79/files/drivers/mtd/nand/raw/rb91x_nand.c
index cf2809bfa3..8a154c3514 100644
--- a/target/linux/ath79/files/drivers/mtd/nand/raw/rb91x_nand.c
+++ b/target/linux/ath79/files/drivers/mtd/nand/raw/rb91x_nand.c
@@ -335,13 +335,11 @@ static int rb91x_nand_probe(struct platform_device *pdev)
return 0;
}
-static int rb91x_nand_remove(struct platform_device *pdev)
+static void rb91x_nand_remove(struct platform_device *pdev)
{
struct rb91x_nand_drvdata *drvdata = platform_get_drvdata(pdev);
rb91x_nand_release(drvdata);
-
- return 0;
}
static const struct of_device_id rb91x_nand_match[] = {
@@ -353,7 +351,7 @@ MODULE_DEVICE_TABLE(of, rb91x_nand_match);
static struct platform_driver rb91x_nand_driver = {
.probe = rb91x_nand_probe,
- .remove = rb91x_nand_remove,
+ .remove_new = rb91x_nand_remove,
.driver = {
.name = "rb91x-nand",
.of_match_table = rb91x_nand_match,
diff --git a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_legacy_mdio.c b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_legacy_mdio.c
index fda561a374..9ccba74720 100644
--- a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_legacy_mdio.c
+++ b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_legacy_mdio.c
@@ -221,12 +221,11 @@ static int ag71xx_mdio_probe(struct platform_device *pdev)
return 0;
}
-static int ag71xx_mdio_remove(struct platform_device *pdev)
+static void ag71xx_mdio_remove(struct platform_device *pdev)
{
struct ag71xx_mdio *am = platform_get_drvdata(pdev);
mdiobus_unregister(am->mii_bus);
- return 0;
}
static const struct of_device_id ag71xx_mdio_match[] = {
@@ -239,7 +238,7 @@ static const struct of_device_id ag71xx_mdio_match[] = {
static struct platform_driver ag71xx_mdio_driver = {
.probe = ag71xx_mdio_probe,
- .remove = ag71xx_mdio_remove,
+ .remove_new = ag71xx_mdio_remove,
.driver = {
.name = "ag71xx-legacy-mdio",
.of_match_table = ag71xx_mdio_match,
diff --git a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
index c6fcea1abd..f2d1e35828 100644
--- a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
+++ b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
@@ -1731,20 +1731,20 @@ err_phy_disconnect:
return err;
}
-static int ag71xx_remove(struct platform_device *pdev)
+static void ag71xx_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
struct ag71xx *ag;
if (!dev)
- return 0;
+ return;
ag = netdev_priv(dev);
ag71xx_debugfs_exit(ag);
ag71xx_phy_disconnect(ag);
unregister_netdev(dev);
platform_set_drvdata(pdev, NULL);
- return 0;
+
}
static const struct of_device_id ag71xx_match[] = {
@@ -1763,7 +1763,7 @@ static const struct of_device_id ag71xx_match[] = {
static struct platform_driver ag71xx_driver = {
.probe = ag71xx_probe,
- .remove = ag71xx_remove,
+ .remove_new = ag71xx_remove,
.driver = {
.name = AG71XX_DRV_NAME,
.of_match_table = ag71xx_match,
More information about the lede-commits
mailing list