[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201130220635.GA42747@roeck-us.net>
Date: Mon, 30 Nov 2020 14:06:35 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: "Enrico Weigelt, metux IT consult" <info@...ux.net>
Cc: linux-kernel@...r.kernel.org, wim@...ux-watchdog.org,
linux-watchdog@...r.kernel.org
Subject: Re: [PATCH 1/3] watchdog: iTCO_wdt: use module_platform_device()
macro
On Tue, Nov 17, 2020 at 04:22:12PM +0100, Enrico Weigelt, metux IT consult wrote:
> Reducing init boilerplate by using the module_platform_device macro.
>
> Signed-off-by: Enrico Weigelt, metux IT consult <info@...ux.net>
Reviewed-by: Guenter Roeck <linux@...ck-us.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@...ana.be>");
> MODULE_DESCRIPTION("Intel TCO WatchDog Timer Driver");
Powered by blists - more mailing lists