Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20230307070404.2256308-3-u.kleine-koenig@pengutronix.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>

authored by

Uwe Kleine-König and committed by
Wim Van Sebroeck
4095b94d 16da6fbb

+1 -11
+1 -11
drivers/watchdog/rn5t618_wdt.c
··· 178 178 179 179 platform_set_drvdata(pdev, wdt); 180 180 181 - return watchdog_register_device(&wdt->wdt_dev); 182 - } 183 - 184 - static int rn5t618_wdt_remove(struct platform_device *pdev) 185 - { 186 - struct rn5t618_wdt *wdt = platform_get_drvdata(pdev); 187 - 188 - watchdog_unregister_device(&wdt->wdt_dev); 189 - 190 - return 0; 181 + return devm_watchdog_register_device(dev, &wdt->wdt_dev); 191 182 } 192 183 193 184 static struct platform_driver rn5t618_wdt_driver = { 194 185 .probe = rn5t618_wdt_probe, 195 - .remove = rn5t618_wdt_remove, 196 186 .driver = { 197 187 .name = DRIVER_NAME, 198 188 },