summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorEnrico Weigelt, metux IT consult <info@metux.net>2020-11-17 16:22:12 +0100
committerWim Van Sebroeck <wim@linux-watchdog.org>2020-12-13 16:17:43 +0100
commit89c866f5a238f6f68b0f71fab55f77a07e8f3adb (patch)
tree91080c8e374ac11e4080e9e24b3df4122b753480 /drivers/watchdog
parent6f733cb2e7db38f8141b14740bcde577844a03b7 (diff)
downloadlinux-89c866f5a238f6f68b0f71fab55f77a07e8f3adb.tar.bz2
watchdog: iTCO_wdt: use module_platform_device() macro
Reducing init boilerplate by using the module_platform_device macro. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20201117152214.32244-1-info@metux.net Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/iTCO_wdt.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
index a370a185a41c..f2ddc8fc71cd 100644
--- a/drivers/watchdog/iTCO_wdt.c
+++ b/drivers/watchdog/iTCO_wdt.c
@@ -651,21 +651,7 @@ static struct platform_driver iTCO_wdt_driver = {
},
};
-static int __init iTCO_wdt_init_module(void)
-{
- pr_info("Intel TCO WatchDog Timer Driver v%s\n", DRV_VERSION);
-
- return platform_driver_register(&iTCO_wdt_driver);
-}
-
-static void __exit iTCO_wdt_cleanup_module(void)
-{
- platform_driver_unregister(&iTCO_wdt_driver);
- pr_info("Watchdog Module Unloaded\n");
-}
-
-module_init(iTCO_wdt_init_module);
-module_exit(iTCO_wdt_cleanup_module);
+module_platform_driver(iTCO_wdt_driver);
MODULE_AUTHOR("Wim Van Sebroeck <wim@iguana.be>");
MODULE_DESCRIPTION("Intel TCO WatchDog Timer Driver");