Skip to content

Commit 0e89b2c

Browse files
Uwe Kleine-KönigWim Van Sebroeck
authored andcommitted
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: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230307070404.2256308-4-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
1 parent 4095b94 commit 0e89b2c

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

drivers/watchdog/wm8350_wdt.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -153,18 +153,11 @@ static int wm8350_wdt_probe(struct platform_device *pdev)
153153
/* Default to 4s timeout */
154154
wm8350_wdt_set_timeout(&wm8350_wdt, 4);
155155

156-
return watchdog_register_device(&wm8350_wdt);
157-
}
158-
159-
static int wm8350_wdt_remove(struct platform_device *pdev)
160-
{
161-
watchdog_unregister_device(&wm8350_wdt);
162-
return 0;
156+
return devm_watchdog_register_device(&pdev->dev, &wm8350_wdt);
163157
}
164158

165159
static struct platform_driver wm8350_wdt_driver = {
166160
.probe = wm8350_wdt_probe,
167-
.remove = wm8350_wdt_remove,
168161
.driver = {
169162
.name = "wm8350-wdt",
170163
},

0 commit comments

Comments
 (0)