]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
net: rfkill: convert net/rfkill/* to use module_platform_driver()
authorAxel Lin <axel.lin@gmail.com>
Mon, 28 Nov 2011 09:15:04 +0000 (17:15 +0800)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 30 Nov 2011 20:08:27 +0000 (15:08 -0500)
This patch converts the drivers in net/rfkill/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Antonio Ospite <ospite@studenti.unina.it>
Cc: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/rfkill/rfkill-gpio.c
net/rfkill/rfkill-regulator.c

index 128677d69056a209ad4f52c694010d7d979f0966..ca355e7e58b4fd0d7fdb4918e08e8fedae767afd 100644 (file)
@@ -220,18 +220,7 @@ static struct platform_driver rfkill_gpio_driver = {
        },
 };
 
-static int __init rfkill_gpio_init(void)
-{
-       return platform_driver_register(&rfkill_gpio_driver);
-}
-
-static void __exit rfkill_gpio_exit(void)
-{
-       platform_driver_unregister(&rfkill_gpio_driver);
-}
-
-module_init(rfkill_gpio_init);
-module_exit(rfkill_gpio_exit);
+module_platform_driver(rfkill_gpio_driver);
 
 MODULE_DESCRIPTION("gpio rfkill");
 MODULE_AUTHOR("NVIDIA");
index 3ca7277a3c362db9b4f1499cf00fcc3897839393..2ebfe8d0e87367e9ec695de4d06648fd1f5d9a76 100644 (file)
@@ -144,17 +144,7 @@ static struct platform_driver rfkill_regulator_driver = {
        },
 };
 
-static int __init rfkill_regulator_init(void)
-{
-       return platform_driver_register(&rfkill_regulator_driver);
-}
-module_init(rfkill_regulator_init);
-
-static void __exit rfkill_regulator_exit(void)
-{
-       platform_driver_unregister(&rfkill_regulator_driver);
-}
-module_exit(rfkill_regulator_exit);
+module_platform_driver(rfkill_regulator_driver);
 
 MODULE_AUTHOR("Guiming Zhuo <gmzhuo@gmail.com>");
 MODULE_AUTHOR("Antonio Ospite <ospite@studenti.unina.it>");