mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
watchdog: rtd119x_wdt: Fix remove function
[ Upstream commit8dd29f1951] The driver registers the watchdog with devm_watchdog_register_device() but still calls watchdog_unregister_device() on remove. Since clocks have to be stopped when removing the driver, after the watchdog device has been unregistered, we can not drop the call to watchdog_unregister_device(). Use watchdog_register_device() to register the watchdog. Fixes:2bdf6acbfe("watchdog: Add Realtek RTD1295") Cc: Andreas Färber <afaerber@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ef90724bad
commit
efe0c19618
@@ -135,7 +135,7 @@ static int rtd119x_wdt_probe(struct platform_device *pdev)
|
||||
rtd119x_wdt_set_timeout(&data->wdt_dev, data->wdt_dev.timeout);
|
||||
rtd119x_wdt_stop(&data->wdt_dev);
|
||||
|
||||
ret = devm_watchdog_register_device(&pdev->dev, &data->wdt_dev);
|
||||
ret = watchdog_register_device(&data->wdt_dev);
|
||||
if (ret) {
|
||||
clk_disable_unprepare(data->clk);
|
||||
clk_put(data->clk);
|
||||
|
||||
Reference in New Issue
Block a user