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>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 27 Oct 2016 16:15:54 +0200
From:   Slawomir Stepien <sst@...zta.fm>
To:     dmitry.torokhov@...il.com
Cc:     ldewangan@...dia.com, linux-input@...r.kernel.org,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [PATCH] Input: gpio-keys - use module_platform_driver macro

The gpio_keys_init() and gpio_keys_exit() are not doing anything
more then just register and unregister. Replace these functions with
module_platform_driver.

Signed-off-by: Slawomir Stepien <sst@...zta.fm>
---
 drivers/input/keyboard/gpio_keys.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index 2909365..e54b586 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -877,18 +877,7 @@ static struct platform_driver gpio_keys_device_driver = {
 	}
 };
 
-static int __init gpio_keys_init(void)
-{
-	return platform_driver_register(&gpio_keys_device_driver);
-}
-
-static void __exit gpio_keys_exit(void)
-{
-	platform_driver_unregister(&gpio_keys_device_driver);
-}
-
-late_initcall(gpio_keys_init);
-module_exit(gpio_keys_exit);
+module_platform_driver(gpio_keys_device_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Phil Blundell <pb@...dhelds.org>");
-- 
2.10.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ