aboutsummaryrefslogtreecommitdiffstats
path: root/net/rfkill
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-11-28 04:15:04 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-11-30 15:08:27 -0500
commit98ef55f66f791a04877c9e0a272a8c50cceaf9a5 (patch)
tree0c93263b27d1b5f4da81558763d796c59021936a /net/rfkill
parent264827555bff54bc2c896b51777e89bd22d01c21 (diff)
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: Axel Lin <axel.lin@gmail.com> Acked-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/rfkill')
-rw-r--r--net/rfkill/rfkill-gpio.c13
-rw-r--r--net/rfkill/rfkill-regulator.c12
2 files changed, 2 insertions, 23 deletions
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 = {
220 }, 220 },
221}; 221};
222 222
223static int __init rfkill_gpio_init(void) 223module_platform_driver(rfkill_gpio_driver);
224{
225 return platform_driver_register(&rfkill_gpio_driver);
226}
227
228static void __exit rfkill_gpio_exit(void)
229{
230 platform_driver_unregister(&rfkill_gpio_driver);
231}
232
233module_init(rfkill_gpio_init);
234module_exit(rfkill_gpio_exit);
235 224
236MODULE_DESCRIPTION("gpio rfkill"); 225MODULE_DESCRIPTION("gpio rfkill");
237MODULE_AUTHOR("NVIDIA"); 226MODULE_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 = {
144 }, 144 },
145}; 145};
146 146
147static int __init rfkill_regulator_init(void) 147module_platform_driver(rfkill_regulator_driver);
148{
149 return platform_driver_register(&rfkill_regulator_driver);
150}
151module_init(rfkill_regulator_init);
152
153static void __exit rfkill_regulator_exit(void)
154{
155 platform_driver_unregister(&rfkill_regulator_driver);
156}
157module_exit(rfkill_regulator_exit);
158 148
159MODULE_AUTHOR("Guiming Zhuo <gmzhuo@gmail.com>"); 149MODULE_AUTHOR("Guiming Zhuo <gmzhuo@gmail.com>");
160MODULE_AUTHOR("Antonio Ospite <ospite@studenti.unina.it>"); 150MODULE_AUTHOR("Antonio Ospite <ospite@studenti.unina.it>");