OSDN Git Service

watchdog: rtd119x_wdt: Fix remove function
authorGuenter Roeck <linux@roeck-us.net>
Sun, 7 Apr 2019 15:29:35 +0000 (08:29 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2020 13:50:45 +0000 (14:50 +0100)
commitefe0c19618db13e354708c3ed7172a1e9753bd8a
tree803e1dd651ce4625dc98015f713ef7ba8ca3fa6b
parentef90724bad06e98f07ffd95a6294235ba59b8204
watchdog: rtd119x_wdt: Fix remove function

[ Upstream commit 8dd29f19512cc75ee470d7bb8ec86af199de23a8 ]

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: 2bdf6acbfead7 ("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>
drivers/watchdog/rtd119x_wdt.c