From: Axel Lin Date: Mon, 28 Nov 2011 09:15:04 +0000 (+0800) Subject: net: rfkill: convert net/rfkill/* to use module_platform_driver() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=98ef55f66f791a04877c9e0a272a8c50cceaf9a5;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git net: rfkill: convert net/rfkill/* to use module_platform_driver() 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" Cc: "John W. Linville" Cc: Johannes Berg Cc: Antonio Ospite Cc: Rhyland Klein Signed-off-by: Axel Lin Acked-by: Rhyland Klein Signed-off-by: John W. Linville --- diff --git a/net/rfkill/rfkill-gpio.c b/net/rfkill/rfkill-gpio.c index 128677d69056..ca355e7e58b4 100644 --- a/net/rfkill/rfkill-gpio.c +++ b/net/rfkill/rfkill-gpio.c @@ -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"); diff --git a/net/rfkill/rfkill-regulator.c b/net/rfkill/rfkill-regulator.c index 3ca7277a3c36..2ebfe8d0e873 100644 --- a/net/rfkill/rfkill-regulator.c +++ b/net/rfkill/rfkill-regulator.c @@ -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 "); MODULE_AUTHOR("Antonio Ospite ");