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: bcm47xx: 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-2-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
16da6fbb 74d6c68c

+1 -11
+1 -11
drivers/watchdog/bcm47xx_wdt.c
··· 202 202 watchdog_set_restart_priority(&wdt->wdd, 64); 203 203 watchdog_stop_on_reboot(&wdt->wdd); 204 204 205 - ret = watchdog_register_device(&wdt->wdd); 205 + ret = devm_watchdog_register_device(&pdev->dev, &wdt->wdd); 206 206 if (ret) 207 207 goto err_timer; 208 208 ··· 218 218 return ret; 219 219 } 220 220 221 - static int bcm47xx_wdt_remove(struct platform_device *pdev) 222 - { 223 - struct bcm47xx_wdt *wdt = dev_get_platdata(&pdev->dev); 224 - 225 - watchdog_unregister_device(&wdt->wdd); 226 - 227 - return 0; 228 - } 229 - 230 221 static struct platform_driver bcm47xx_wdt_driver = { 231 222 .driver = { 232 223 .name = "bcm47xx-wdt", 233 224 }, 234 225 .probe = bcm47xx_wdt_probe, 235 - .remove = bcm47xx_wdt_remove, 236 226 }; 237 227 238 228 module_platform_driver(bcm47xx_wdt_driver);