]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
generic: convert driver to .remove_new
authorChristian Marangi <ansuelsmth@gmail.com>
Thu, 10 Apr 2025 19:29:11 +0000 (21:29 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Fri, 11 Apr 2025 09:21:18 +0000 (11:21 +0200)
Convert driver to .remove_new in preparation for kernel 6.12 support.

Link: https://github.com/openwrt/openwrt/pull/18454
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
target/linux/generic/files/drivers/net/phy/adm6996.c
target/linux/generic/files/drivers/net/phy/b53/b53_mmap.c
target/linux/generic/files/drivers/net/phy/b53/b53_srab.c
target/linux/generic/files/drivers/net/phy/rtl8366rb.c
target/linux/generic/files/drivers/net/phy/rtl8366s.c
target/linux/generic/files/drivers/net/phy/rtl8367.c
target/linux/generic/files/drivers/net/phy/rtl8367b.c

index 66013f273de77d1d5bc7f58d1616b6bfef1b598d..dfee13c0bf4dbb63c78cdc02b8cd44edf0b1ca34 100644 (file)
@@ -1199,19 +1199,17 @@ static int adm6996_gpio_probe(struct platform_device *pdev)
        return 0;
 }
 
-static int adm6996_gpio_remove(struct platform_device *pdev)
+static void adm6996_gpio_remove(struct platform_device *pdev)
 {
        struct adm6996_priv *priv = platform_get_drvdata(pdev);
 
        if (priv && (priv->model == ADM6996M || priv->model == ADM6996L))
                unregister_switch(&priv->dev);
-
-       return 0;
 }
 
 static struct platform_driver adm6996_gpio_driver = {
        .probe = adm6996_gpio_probe,
-       .remove = adm6996_gpio_remove,
+       .remove_new = adm6996_gpio_remove,
        .driver = {
                .name = "adm6996_gpio",
        },
index 0a21ff1de55ed41b3d0a26c1946d6b03b1585dc3..62dfe1c24282ff6aae11386274bbbcd0e6c49f7c 100644 (file)
@@ -217,19 +217,17 @@ static int b53_mmap_probe(struct platform_device *pdev)
        return b53_swconfig_switch_register(dev);
 }
 
-static int b53_mmap_remove(struct platform_device *pdev)
+static void b53_mmap_remove(struct platform_device *pdev)
 {
        struct b53_device *dev = platform_get_drvdata(pdev);
 
        if (dev)
                b53_switch_remove(dev);
-
-       return 0;
 }
 
 static struct platform_driver b53_mmap_driver = {
        .probe = b53_mmap_probe,
-       .remove = b53_mmap_remove,
+       .remove_new = b53_mmap_remove,
        .driver = {
                .name = "b53-switch",
        },
index ead5209cf0b84b74b7e015b158eb81b63aafec2e..f8cb99383ff16e381b464288638fffa306270aa8 100644 (file)
@@ -354,19 +354,17 @@ static int b53_srab_probe(struct platform_device *pdev)
        return b53_swconfig_switch_register(dev);
 }
 
-static int b53_srab_remove(struct platform_device *pdev)
+static void b53_srab_remove(struct platform_device *pdev)
 {
        struct b53_device *dev = platform_get_drvdata(pdev);
 
        if (dev)
                b53_switch_remove(dev);
-
-       return 0;
 }
 
 static struct platform_driver b53_srab_driver = {
        .probe = b53_srab_probe,
-       .remove = b53_srab_remove,
+       .remove_new = b53_srab_remove,
        .driver = {
                .name = "b53-srab-switch",
        },
index 0878ca9f1400cf3d214165b37a6f67976d9de57c..7057b252526dcac6327a0f58512c6b0abd5cf4aa 100644 (file)
@@ -1478,7 +1478,7 @@ static int rtl8366rb_probe(struct platform_device *pdev)
        return err;
 }
 
-static int rtl8366rb_remove(struct platform_device *pdev)
+static void rtl8366rb_remove(struct platform_device *pdev)
 {
        struct rtl8366_smi *smi = platform_get_drvdata(pdev);
 
@@ -1488,8 +1488,6 @@ static int rtl8366rb_remove(struct platform_device *pdev)
                rtl8366_smi_cleanup(smi);
                kfree(smi);
        }
-
-       return 0;
 }
 
 #ifdef CONFIG_OF
@@ -1506,7 +1504,7 @@ static struct platform_driver rtl8366rb_driver = {
                .of_match_table = of_match_ptr(rtl8366rb_match),
        },
        .probe          = rtl8366rb_probe,
-       .remove         = rtl8366rb_remove,
+       .remove_new             = rtl8366rb_remove,
 };
 
 static int __init rtl8366rb_module_init(void)
index d4045fcc06225956b9827e44123c548a6d96abe9..5458c50487287c3bfc2351d3724a78a750f253d8 100644 (file)
@@ -1266,7 +1266,7 @@ static int rtl8366s_probe(struct platform_device *pdev)
        return err;
 }
 
-static int rtl8366s_remove(struct platform_device *pdev)
+static void rtl8366s_remove(struct platform_device *pdev)
 {
        struct rtl8366_smi *smi = platform_get_drvdata(pdev);
 
@@ -1276,8 +1276,6 @@ static int rtl8366s_remove(struct platform_device *pdev)
                rtl8366_smi_cleanup(smi);
                kfree(smi);
        }
-
-       return 0;
 }
 
 #ifdef CONFIG_OF
@@ -1296,7 +1294,7 @@ static struct platform_driver rtl8366s_driver = {
 #endif
        },
        .probe          = rtl8366s_probe,
-       .remove         = rtl8366s_remove,
+       .remove_new     = rtl8366s_remove,
 };
 
 static int __init rtl8366s_module_init(void)
index 950e9d2767d9ecdc794e3440677aaa070607b11d..1b996019a6145c5b05f265435e5fdbd0c150993a 100644 (file)
@@ -1801,7 +1801,7 @@ static int rtl8367_probe(struct platform_device *pdev)
        return err;
 }
 
-static int rtl8367_remove(struct platform_device *pdev)
+static void rtl8367_remove(struct platform_device *pdev)
 {
        struct rtl8366_smi *smi = platform_get_drvdata(pdev);
 
@@ -1811,8 +1811,6 @@ static int rtl8367_remove(struct platform_device *pdev)
                rtl8366_smi_cleanup(smi);
                kfree(smi);
        }
-
-       return 0;
 }
 
 static void rtl8367_shutdown(struct platform_device *pdev)
@@ -1839,7 +1837,7 @@ static struct platform_driver rtl8367_driver = {
 #endif
        },
        .probe          = rtl8367_probe,
-       .remove         = rtl8367_remove,
+       .remove_new     = rtl8367_remove,
        .shutdown       = rtl8367_shutdown,
 };
 
index 5f885aa5be8cd575fd09c9f0f27c82ffce1964c2..5adcf00f0cac2516bf2108a8c7e1327aa4078117 100644 (file)
@@ -1600,7 +1600,7 @@ static int  rtl8367b_probe(struct platform_device *pdev)
        return err;
 }
 
-static int rtl8367b_remove(struct platform_device *pdev)
+static void rtl8367b_remove(struct platform_device *pdev)
 {
        struct rtl8366_smi *smi = platform_get_drvdata(pdev);
 
@@ -1610,8 +1610,6 @@ static int rtl8367b_remove(struct platform_device *pdev)
                rtl8366_smi_cleanup(smi);
                kfree(smi);
        }
-
-       return 0;
 }
 
 static void rtl8367b_shutdown(struct platform_device *pdev)
@@ -1638,7 +1636,7 @@ static struct platform_driver rtl8367b_driver = {
 #endif
        },
        .probe          = rtl8367b_probe,
-       .remove         = rtl8367b_remove,
+       .remove_new     = rtl8367b_remove,
        .shutdown       = rtl8367b_shutdown,
 };