From 9073b48e96b4fc7ede259093b209ccee39645c63 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Sat, 26 Apr 2025 20:04:31 +0200 Subject: [PATCH] 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 --- ...pcs-pcs-mtk-lynxi-add-platform-driver-for-MT7988.patch | 8 +++----- ...9-05-net-pcs-add-driver-for-MediaTek-USXGMII-PCS.patch | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/target/linux/generic/pending-6.6/739-03-net-pcs-pcs-mtk-lynxi-add-platform-driver-for-MT7988.patch b/target/linux/generic/pending-6.6/739-03-net-pcs-pcs-mtk-lynxi-add-platform-driver-for-MT7988.patch index b67c8a0ea0b..faa7624307d 100644 --- a/target/linux/generic/pending-6.6/739-03-net-pcs-pcs-mtk-lynxi-add-platform-driver-for-MT7988.patch +++ b/target/linux/generic/pending-6.6/739-03-net-pcs-pcs-mtk-lynxi-add-platform-driver-for-MT7988.patch @@ -206,7 +206,7 @@ Signed-off-by: Daniel Golle } 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 + 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 + 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 + .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); + diff --git a/target/linux/generic/pending-6.6/739-05-net-pcs-add-driver-for-MediaTek-USXGMII-PCS.patch b/target/linux/generic/pending-6.6/739-05-net-pcs-add-driver-for-MediaTek-USXGMII-PCS.patch index c7fcac3abfd..0aaa39717c1 100644 --- a/target/linux/generic/pending-6.6/739-05-net-pcs-add-driver-for-MediaTek-USXGMII-PCS.patch +++ b/target/linux/generic/pending-6.6/739-05-net-pcs-add-driver-for-MediaTek-USXGMII-PCS.patch @@ -58,7 +58,7 @@ Signed-off-by: Daniel Golle +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 + 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 + 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 + .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); +