lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20200518114954.7417-1-harshalchau04@gmail.com>
Date:   Mon, 18 May 2020 17:19:54 +0530
From:   Harshal Chaudhari <harshalchau04@...il.com>
To:     wim@...ux-watchdog.org, linux@...ck-us.net
Cc:     linux-watchdog@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] watchdog: gef_wdt.c: convert to module_platform_driver()

The driver init and exit function don't do anything besides registering
and unregistering the platform driver, so the module_platform_driver()
macro could just be used instead of having separate functions.

Signed-off-by: Harshal Chaudhari <harshalchau04@...il.com>
---
 drivers/watchdog/gef_wdt.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/drivers/watchdog/gef_wdt.c b/drivers/watchdog/gef_wdt.c
index f6541d1b65e3..4421a452d0f5 100644
--- a/drivers/watchdog/gef_wdt.c
+++ b/drivers/watchdog/gef_wdt.c
@@ -311,19 +311,7 @@ static struct platform_driver gef_wdt_driver = {
 	.remove		= gef_wdt_remove,
 };
 
-static int __init gef_wdt_init(void)
-{
-	pr_info("GE watchdog driver\n");
-	return platform_driver_register(&gef_wdt_driver);
-}
-
-static void __exit gef_wdt_exit(void)
-{
-	platform_driver_unregister(&gef_wdt_driver);
-}
-
-module_init(gef_wdt_init);
-module_exit(gef_wdt_exit);
+module_platform_driver(gef_wdt_driver);
 
 MODULE_AUTHOR("Martyn Welch <martyn.welch@...com>");
 MODULE_DESCRIPTION("GE watchdog driver");
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ