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

watchdog: rn5t618: 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>
Link: https://lore.kernel.org/r/20230307070404.2256308-3-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 16da6fbb
...@@ -178,21 +178,11 @@ static int rn5t618_wdt_probe(struct platform_device *pdev) ...@@ -178,21 +178,11 @@ static int rn5t618_wdt_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, wdt); platform_set_drvdata(pdev, wdt);
return watchdog_register_device(&wdt->wdt_dev); return devm_watchdog_register_device(dev, &wdt->wdt_dev);
}
static int rn5t618_wdt_remove(struct platform_device *pdev)
{
struct rn5t618_wdt *wdt = platform_get_drvdata(pdev);
watchdog_unregister_device(&wdt->wdt_dev);
return 0;
} }
static struct platform_driver rn5t618_wdt_driver = { static struct platform_driver rn5t618_wdt_driver = {
.probe = rn5t618_wdt_probe, .probe = rn5t618_wdt_probe,
.remove = rn5t618_wdt_remove,
.driver = { .driver = {
.name = DRIVER_NAME, .name = DRIVER_NAME,
}, },
......
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