]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ath79: convert driver to .remove_new 18535/head
authorMieczyslaw Nalewaj <namiltd@yahoo.com>
Sat, 19 Apr 2025 10:23:14 +0000 (12:23 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Tue, 22 Apr 2025 17:21:07 +0000 (19:21 +0200)
Convert driver to .remove_new in preparation for kernel 6.12 support.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18535
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c
target/linux/ath79/files/drivers/mtd/nand/raw/nand_rb4xx.c
target/linux/ath79/files/drivers/mtd/nand/raw/rb91x_nand.c
target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_legacy_mdio.c
target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c

index 029142ca618abdd219187679f2dc7e08821da2ce..c1670b61a52bfd9b9daba2b83cc70d4da625d96a 100644 (file)
@@ -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,
index e42631525c4b56dad37bc159ccd9ff2e9d62a288..51a6fa99c6eaa44daced85b770a5cf6b481a3379 100644 (file)
@@ -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",
index cf2809bfa36678a8a5271b4628050f4a05dc179a..8a154c351463e9e83ccb739614ededc3c0e07ea0 100644 (file)
@@ -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,
index fda561a37431646b979894476e432503b30c2179..9ccba7472078a29028938ac7b5211fe5b23bc9f7 100644 (file)
@@ -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,
index c6fcea1abdac1fc36f07db6a82476934dab5de35..f2d1e3582879e09e58c067464c6eb9c9c5cfded7 100644 (file)
@@ -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,