[openwrt/openwrt] ramips: pwm: use remove_new

LEDE Commits lede-commits at lists.infradead.org
Thu May 1 16:34:35 PDT 2025


ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/24d7b20cf54ce827f747dae1899875310506041c

commit 24d7b20cf54ce827f747dae1899875310506041c
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Sat Apr 26 15:44:00 2025 -0700

    ramips: pwm: use remove_new
    
    Easy way to add compatibility for kernel 6.12.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/18660
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 .../linux/ramips/patches-6.6/845-pwm-add-mediatek-support.patch   | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/target/linux/ramips/patches-6.6/845-pwm-add-mediatek-support.patch b/target/linux/ramips/patches-6.6/845-pwm-add-mediatek-support.patch
index e7d11a0429..57e87e978c 100644
--- a/target/linux/ramips/patches-6.6/845-pwm-add-mediatek-support.patch
+++ b/target/linux/ramips/patches-6.6/845-pwm-add-mediatek-support.patch
@@ -41,7 +41,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  obj-$(CONFIG_PWM_MXS)		+= pwm-mxs.o
 --- /dev/null
 +++ b/drivers/pwm/pwm-mediatek-ramips.c
-@@ -0,0 +1,187 @@
+@@ -0,0 +1,185 @@
 +/*
 + * Mediatek Pulse Width Modulator driver
 + *
@@ -197,15 +197,13 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +	return devm_pwmchip_add(&pdev->dev, &pc->chip);
 +}
 +
-+static int mtk_pwm_remove(struct platform_device *pdev)
++static void mtk_pwm_remove(struct platform_device *pdev)
 +{
 +	struct mtk_pwm_chip *pc = platform_get_drvdata(pdev);
 +	int i;
 +
 +	for (i = 0; i < NUM_PWM; i++)
 +		pwm_disable(&pc->chip.pwms[i]);
-+
-+	return 0;
 +}
 +
 +static const struct of_device_id mtk_pwm_of_match[] = {
@@ -221,7 +219,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +		.of_match_table = mtk_pwm_of_match,
 +	},
 +	.probe = mtk_pwm_probe,
-+	.remove = mtk_pwm_remove,
++	.remove_new = mtk_pwm_remove,
 +};
 +
 +module_platform_driver(mtk_pwm_driver);




More information about the lede-commits mailing list