Skip to content

Commit

Permalink
watchdog: iTCO_wdt: use module_platform_device() macro
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
metux authored and Wim Van Sebroeck committed Dec 13, 2020
1 parent 6f733cb commit 89c866f
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions drivers/watchdog/iTCO_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 89c866f

Please sign in to comment.