Просмотр исходного кода

generic: convert driver to .remove_new

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 <[email protected]>
Christian Marangi 8 месяцев назад
Родитель
Сommit
31139fcdfb

+ 2 - 4
target/linux/generic/files/drivers/net/phy/adm6996.c

@@ -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",
 	},

+ 2 - 4
target/linux/generic/files/drivers/net/phy/b53/b53_mmap.c

@@ -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",
 	},

+ 2 - 4
target/linux/generic/files/drivers/net/phy/b53/b53_srab.c

@@ -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",
 	},

+ 2 - 4
target/linux/generic/files/drivers/net/phy/rtl8366rb.c

@@ -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)

+ 2 - 4
target/linux/generic/files/drivers/net/phy/rtl8366s.c

@@ -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)

+ 2 - 4
target/linux/generic/files/drivers/net/phy/rtl8367.c

@@ -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,
 };
 

+ 2 - 4
target/linux/generic/files/drivers/net/phy/rtl8367b.c

@@ -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,
 };