aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-11-26 14:04:25 -0500
committerDavid S. Miller <davem@davemloft.net>2011-12-04 13:46:58 -0500
commitdbf2b92d54e73e4a2524b90d29bd498ecc4aa593 (patch)
treef632c477fbee168e36ca42013c68cf761dff3f7b
parente410471029ba99e85af5e2a1e7e747c7b4de2bc3 (diff)
sbus: convert drivers/sbus/char/* to use module_platform_driver()
This patch converts the drivers in drivers/sbus/char/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/sbus/char/bbc_i2c.c13
-rw-r--r--drivers/sbus/char/display7seg.c13
-rw-r--r--drivers/sbus/char/envctrl.c12
-rw-r--r--drivers/sbus/char/flash.c12
-rw-r--r--drivers/sbus/char/uctrl.c12
5 files changed, 5 insertions, 57 deletions
diff --git a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c
index a0d1399577cc..542668292900 100644
--- a/drivers/sbus/char/bbc_i2c.c
+++ b/drivers/sbus/char/bbc_i2c.c
@@ -416,17 +416,6 @@ static struct platform_driver bbc_i2c_driver = {
416 .remove = __devexit_p(bbc_i2c_remove), 416 .remove = __devexit_p(bbc_i2c_remove),
417}; 417};
418 418
419static int __init bbc_i2c_init(void) 419module_platform_driver(bbc_i2c_driver);
420{
421 return platform_driver_register(&bbc_i2c_driver);
422}
423
424static void __exit bbc_i2c_exit(void)
425{
426 platform_driver_unregister(&bbc_i2c_driver);
427}
428
429module_init(bbc_i2c_init);
430module_exit(bbc_i2c_exit);
431 420
432MODULE_LICENSE("GPL"); 421MODULE_LICENSE("GPL");
diff --git a/drivers/sbus/char/display7seg.c b/drivers/sbus/char/display7seg.c
index 965a1fccd66a..4b9939726c34 100644
--- a/drivers/sbus/char/display7seg.c
+++ b/drivers/sbus/char/display7seg.c
@@ -275,15 +275,4 @@ static struct platform_driver d7s_driver = {
275 .remove = __devexit_p(d7s_remove), 275 .remove = __devexit_p(d7s_remove),
276}; 276};
277 277
278static int __init d7s_init(void) 278module_platform_driver(d7s_driver);
279{
280 return platform_driver_register(&d7s_driver);
281}
282
283static void __exit d7s_exit(void)
284{
285 platform_driver_unregister(&d7s_driver);
286}
287
288module_init(d7s_init);
289module_exit(d7s_exit);
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c
index be7b4e56154f..339fd6f65eda 100644
--- a/drivers/sbus/char/envctrl.c
+++ b/drivers/sbus/char/envctrl.c
@@ -1138,16 +1138,6 @@ static struct platform_driver envctrl_driver = {
1138 .remove = __devexit_p(envctrl_remove), 1138 .remove = __devexit_p(envctrl_remove),
1139}; 1139};
1140 1140
1141static int __init envctrl_init(void) 1141module_platform_driver(envctrl_driver);
1142{
1143 return platform_driver_register(&envctrl_driver);
1144}
1145
1146static void __exit envctrl_exit(void)
1147{
1148 platform_driver_unregister(&envctrl_driver);
1149}
1150 1142
1151module_init(envctrl_init);
1152module_exit(envctrl_exit);
1153MODULE_LICENSE("GPL"); 1143MODULE_LICENSE("GPL");
diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c
index 73dd4e7afaaa..826157f38694 100644
--- a/drivers/sbus/char/flash.c
+++ b/drivers/sbus/char/flash.c
@@ -216,16 +216,6 @@ static struct platform_driver flash_driver = {
216 .remove = __devexit_p(flash_remove), 216 .remove = __devexit_p(flash_remove),
217}; 217};
218 218
219static int __init flash_init(void) 219module_platform_driver(flash_driver);
220{
221 return platform_driver_register(&flash_driver);
222}
223
224static void __exit flash_cleanup(void)
225{
226 platform_driver_unregister(&flash_driver);
227}
228 220
229module_init(flash_init);
230module_exit(flash_cleanup);
231MODULE_LICENSE("GPL"); 221MODULE_LICENSE("GPL");
diff --git a/drivers/sbus/char/uctrl.c b/drivers/sbus/char/uctrl.c
index ebce9639a26a..0b31658ccde5 100644
--- a/drivers/sbus/char/uctrl.c
+++ b/drivers/sbus/char/uctrl.c
@@ -435,16 +435,6 @@ static struct platform_driver uctrl_driver = {
435}; 435};
436 436
437 437
438static int __init uctrl_init(void) 438module_platform_driver(uctrl_driver);
439{
440 return platform_driver_register(&uctrl_driver);
441}
442
443static void __exit uctrl_exit(void)
444{
445 platform_driver_unregister(&uctrl_driver);
446}
447 439
448module_init(uctrl_init);
449module_exit(uctrl_exit);
450MODULE_LICENSE("GPL"); 440MODULE_LICENSE("GPL");