Commit 0e89b2c9 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Wim Van Sebroeck

watchdog: wm8350: Simplify using devm_watchdog_register_device()

This allows to drop the .remove() function as it only exists to
unregister the watchdog device which is now done in a callback
registered by devm_watchdog_register_device().
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Acked-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230307070404.2256308-4-u.kleine-koenig@pengutronix.deSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@linux-watchdog.org>
parent 4095b94d
...@@ -153,18 +153,11 @@ static int wm8350_wdt_probe(struct platform_device *pdev) ...@@ -153,18 +153,11 @@ static int wm8350_wdt_probe(struct platform_device *pdev)
/* Default to 4s timeout */ /* Default to 4s timeout */
wm8350_wdt_set_timeout(&wm8350_wdt, 4); wm8350_wdt_set_timeout(&wm8350_wdt, 4);
return watchdog_register_device(&wm8350_wdt); return devm_watchdog_register_device(&pdev->dev, &wm8350_wdt);
}
static int wm8350_wdt_remove(struct platform_device *pdev)
{
watchdog_unregister_device(&wm8350_wdt);
return 0;
} }
static struct platform_driver wm8350_wdt_driver = { static struct platform_driver wm8350_wdt_driver = {
.probe = wm8350_wdt_probe, .probe = wm8350_wdt_probe,
.remove = wm8350_wdt_remove,
.driver = { .driver = {
.name = "wm8350-wdt", .name = "wm8350-wdt",
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment