From: Rosen Penev Date: Sat, 26 Apr 2025 22:44:00 +0000 (-0700) Subject: ramips: pwm: use remove_new X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24d7b20cf54ce827f747dae1899875310506041c;p=thirdparty%2Fopenwrt.git ramips: pwm: use remove_new Easy way to add compatibility for kernel 6.12. Signed-off-by: Rosen Penev Link: https://github.com/openwrt/openwrt/pull/18660 Signed-off-by: Christian Marangi --- 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 e7d11a04297..57e87e978c8 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 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 + 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 + .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);