linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] watchdog: iTCO_wdt: use module_platform_device() macro
@ 2020-11-17 15:22 Enrico Weigelt, metux IT consult
  2020-11-17 15:22 ` [PATCH 2/3] watchdog: iTCO_wdt: use dev_*() instead of pr_*() for logging Enrico Weigelt, metux IT consult
  2020-11-17 15:22 ` [PATCH 3/3] watchdog: iTCO_wdt: use pm_ptr() Enrico Weigelt, metux IT consult
  0 siblings, 2 replies; 8+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2020-11-17 15:22 UTC (permalink / raw)
  To: linux-kernel; +Cc: wim, linux, linux-watchdog

Reducing init boilerplate by using the module_platform_device macro.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 drivers/watchdog/iTCO_wdt.c | 16 +---------------
 1 file changed, 1 insertion(+), 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");
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-06-15 14:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-17 15:22 [PATCH 1/3] watchdog: iTCO_wdt: use module_platform_device() macro Enrico Weigelt, metux IT consult
2020-11-17 15:22 ` [PATCH 2/3] watchdog: iTCO_wdt: use dev_*() instead of pr_*() for logging Enrico Weigelt, metux IT consult
2021-06-09 20:32   ` Bjorn Helgaas
2021-06-09 23:54     ` Guenter Roeck
2021-06-14 17:55       ` Enrico Weigelt, metux IT consult
2021-06-15 14:51         ` Bjorn Helgaas
2020-11-17 15:22 ` [PATCH 3/3] watchdog: iTCO_wdt: use pm_ptr() Enrico Weigelt, metux IT consult
2020-11-30 22:17   ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).