Commit 98ef55f6 authored by Axel Lin's avatar Axel Lin Committed by John W. Linville

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" <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: default avatarAxel Lin <axel.lin@gmail.com>
Acked-by: default avatarRhyland Klein <rklein@nvidia.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 26482755
...@@ -220,18 +220,7 @@ static struct platform_driver rfkill_gpio_driver = { ...@@ -220,18 +220,7 @@ static struct platform_driver rfkill_gpio_driver = {
}, },
}; };
static int __init rfkill_gpio_init(void) module_platform_driver(rfkill_gpio_driver);
{
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_DESCRIPTION("gpio rfkill"); MODULE_DESCRIPTION("gpio rfkill");
MODULE_AUTHOR("NVIDIA"); MODULE_AUTHOR("NVIDIA");
......
...@@ -144,17 +144,7 @@ static struct platform_driver rfkill_regulator_driver = { ...@@ -144,17 +144,7 @@ static struct platform_driver rfkill_regulator_driver = {
}, },
}; };
static int __init rfkill_regulator_init(void) module_platform_driver(rfkill_regulator_driver);
{
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_AUTHOR("Guiming Zhuo <gmzhuo@gmail.com>"); MODULE_AUTHOR("Guiming Zhuo <gmzhuo@gmail.com>");
MODULE_AUTHOR("Antonio Ospite <ospite@studenti.unina.it>"); MODULE_AUTHOR("Antonio Ospite <ospite@studenti.unina.it>");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment