generic: convert MTK PCS patch to .remove_new

Convert MTK PCS patch to .remove_new to simplify support for new 6.12
kernel version.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
Christian Marangi 2025-04-26 20:04:31 +02:00
parent 5501a502e4
commit 9073b48e96
No known key found for this signature in database
GPG key ID: AC001D09ADBFEAD7
2 changed files with 6 additions and 10 deletions

View file

@ -206,7 +206,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
}
EXPORT_SYMBOL(mtk_pcs_lynxi_create);
@@ -303,4 +368,144 @@ void mtk_pcs_lynxi_destroy(struct phylin
@@ -303,4 +368,142 @@ void mtk_pcs_lynxi_destroy(struct phylin
}
EXPORT_SYMBOL(mtk_pcs_lynxi_destroy);
@ -264,7 +264,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+ return 0;
+}
+
+static int mtk_pcs_lynxi_remove(struct platform_device *pdev)
+static void mtk_pcs_lynxi_remove(struct platform_device *pdev)
+{
+ struct device *dev = &pdev->dev;
+ struct mtk_pcs_lynxi *cur, *tmp;
@ -277,8 +277,6 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+ break;
+ }
+ mutex_unlock(&instance_mutex);
+
+ return 0;
+}
+
+static const struct of_device_id mtk_pcs_lynxi_of_match[] = {
@ -344,7 +342,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+ .of_match_table = mtk_pcs_lynxi_of_match,
+ },
+ .probe = mtk_pcs_lynxi_probe,
+ .remove = mtk_pcs_lynxi_remove,
+ .remove_new = mtk_pcs_lynxi_remove,
+};
+module_platform_driver(mtk_pcs_lynxi_driver);
+

View file

@ -58,7 +58,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+obj-$(CONFIG_PCS_MTK_USXGMII) += pcs-mtk-usxgmii.o
--- /dev/null
+++ b/drivers/net/pcs/pcs-mtk-usxgmii.c
@@ -0,0 +1,456 @@
@@ -0,0 +1,454 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2023 MediaTek Inc.
@ -429,7 +429,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+ return 0;
+}
+
+static int mtk_usxgmii_remove(struct platform_device *pdev)
+static void mtk_usxgmii_remove(struct platform_device *pdev)
+{
+ struct device *dev = &pdev->dev;
+ struct mtk_usxgmii_pcs *cur, *tmp;
@ -441,8 +441,6 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+ break;
+ }
+ mutex_unlock(&instance_mutex);
+
+ return 0;
+}
+
+static const struct of_device_id mtk_usxgmii_of_mtable[] = {
@ -508,7 +506,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+ .of_match_table = mtk_usxgmii_of_mtable,
+ },
+ .probe = mtk_usxgmii_probe,
+ .remove = mtk_usxgmii_remove,
+ .remove_new = mtk_usxgmii_remove,
+};
+module_platform_driver(mtk_usxgmii_driver);
+