watchdog: loongson2: fix .remove callback return type mismatch

Since Linux 6.11 (commit 0ed03dd1f63f), the platform_driver .remove
callback returns void instead of int. ls2x_wdt_remove still returns int,
triggering an -Werror=incompatible-pointer-types build error at the
.remove = ls2x_wdt_remove assignment.

Change ls2x_wdt_remove's return type to void and drop the return 0.
This commit is contained in:
maoxiaochuan
2026-08-24 14:17:24 +08:00
parent c79742c2ea
commit 1416b0ea42
+1 -3
View File
@@ -147,14 +147,12 @@ err0:
return err;
}
static int ls2x_wdt_remove(struct platform_device *pdev)
static void ls2x_wdt_remove(struct platform_device *pdev)
{
struct ls2x_wdt_drvdata *drvdata = platform_get_drvdata(pdev);
watchdog_unregister_device(&drvdata->wdt);
clk_disable_unprepare(drvdata->clk);
return 0;
}
#ifdef CONFIG_OF