mirror of
https://gitee.com/open-loongarch/linux-6.12.git
synced 2026-10-25 12:37:11 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user