diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-11-25 23:01:10 -0500 |
---|---|---|
committer | Anton Vorontsov <cbouatmailru@gmail.com> | 2012-01-04 00:12:07 -0500 |
commit | 300bac7fb85a20b2704dc3645419057992f78565 (patch) | |
tree | d0c3e327967552ab9ba68866b6c77a951446a7cd /drivers | |
parent | 251f39fe42dae863bd24e30864e6b66076ba076d (diff) |
power_supply: Convert drivers/power/* to use module_platform_driver()
This patch converts the drivers in drivers/power/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.
Cc: Mike Rapoport <mike@compulab.co.il>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Nithish Mahalingam <nithish.mahalingam@intel.com>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Haojian Zhuang <haojian.zhuang@marvell.com>
Cc: Balaji Rao <balajirrao@openmoko.org>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Clifton Barnes <cabarnes@indesign-llc.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/power/da9030_battery.c | 13 | ||||
-rw-r--r-- | drivers/power/ds2760_battery.c | 13 | ||||
-rw-r--r-- | drivers/power/ds2780_battery.c | 16 | ||||
-rw-r--r-- | drivers/power/gpio-charger.c | 12 | ||||
-rw-r--r-- | drivers/power/intel_mid_battery.c | 13 | ||||
-rw-r--r-- | drivers/power/isp1704_charger.c | 12 | ||||
-rw-r--r-- | drivers/power/jz4740-battery.c | 12 | ||||
-rw-r--r-- | drivers/power/max8903_charger.c | 12 | ||||
-rw-r--r-- | drivers/power/max8925_power.c | 12 | ||||
-rw-r--r-- | drivers/power/max8998_charger.c | 12 | ||||
-rw-r--r-- | drivers/power/olpc_battery.c | 12 | ||||
-rw-r--r-- | drivers/power/pcf50633-charger.c | 12 | ||||
-rw-r--r-- | drivers/power/pda_power.c | 15 | ||||
-rw-r--r-- | drivers/power/s3c_adc_battery.c | 12 | ||||
-rw-r--r-- | drivers/power/tosa_battery.c | 13 | ||||
-rw-r--r-- | drivers/power/wm831x_backup.c | 12 | ||||
-rw-r--r-- | drivers/power/wm831x_power.c | 12 | ||||
-rw-r--r-- | drivers/power/wm8350_power.c | 12 | ||||
-rw-r--r-- | drivers/power/wm97xx_battery.c | 13 |
19 files changed, 21 insertions, 219 deletions
diff --git a/drivers/power/da9030_battery.c b/drivers/power/da9030_battery.c index d2c793cf6765..3fd3e95d2b85 100644 --- a/drivers/power/da9030_battery.c +++ b/drivers/power/da9030_battery.c | |||
@@ -588,18 +588,7 @@ static struct platform_driver da903x_battery_driver = { | |||
588 | .remove = da9030_battery_remove, | 588 | .remove = da9030_battery_remove, |
589 | }; | 589 | }; |
590 | 590 | ||
591 | static int da903x_battery_init(void) | 591 | module_platform_driver(da903x_battery_driver); |
592 | { | ||
593 | return platform_driver_register(&da903x_battery_driver); | ||
594 | } | ||
595 | |||
596 | static void da903x_battery_exit(void) | ||
597 | { | ||
598 | platform_driver_unregister(&da903x_battery_driver); | ||
599 | } | ||
600 | |||
601 | module_init(da903x_battery_init); | ||
602 | module_exit(da903x_battery_exit); | ||
603 | 592 | ||
604 | MODULE_DESCRIPTION("DA9030 battery charger driver"); | 593 | MODULE_DESCRIPTION("DA9030 battery charger driver"); |
605 | MODULE_AUTHOR("Mike Rapoport, CompuLab"); | 594 | MODULE_AUTHOR("Mike Rapoport, CompuLab"); |
diff --git a/drivers/power/ds2760_battery.c b/drivers/power/ds2760_battery.c index cda03dae75f4..545874b1df9e 100644 --- a/drivers/power/ds2760_battery.c +++ b/drivers/power/ds2760_battery.c | |||
@@ -641,18 +641,7 @@ static struct platform_driver ds2760_battery_driver = { | |||
641 | .resume = ds2760_battery_resume, | 641 | .resume = ds2760_battery_resume, |
642 | }; | 642 | }; |
643 | 643 | ||
644 | static int __init ds2760_battery_init(void) | 644 | module_platform_driver(ds2760_battery_driver); |
645 | { | ||
646 | return platform_driver_register(&ds2760_battery_driver); | ||
647 | } | ||
648 | |||
649 | static void __exit ds2760_battery_exit(void) | ||
650 | { | ||
651 | platform_driver_unregister(&ds2760_battery_driver); | ||
652 | } | ||
653 | |||
654 | module_init(ds2760_battery_init); | ||
655 | module_exit(ds2760_battery_exit); | ||
656 | 645 | ||
657 | MODULE_LICENSE("GPL"); | 646 | MODULE_LICENSE("GPL"); |
658 | MODULE_AUTHOR("Szabolcs Gyurko <szabolcs.gyurko@tlt.hu>, " | 647 | MODULE_AUTHOR("Szabolcs Gyurko <szabolcs.gyurko@tlt.hu>, " |
diff --git a/drivers/power/ds2780_battery.c b/drivers/power/ds2780_battery.c index 887ec98d8c22..de31cae1ba53 100644 --- a/drivers/power/ds2780_battery.c +++ b/drivers/power/ds2780_battery.c | |||
@@ -841,8 +841,6 @@ static int __devexit ds2780_battery_remove(struct platform_device *pdev) | |||
841 | return 0; | 841 | return 0; |
842 | } | 842 | } |
843 | 843 | ||
844 | MODULE_ALIAS("platform:ds2780-battery"); | ||
845 | |||
846 | static struct platform_driver ds2780_battery_driver = { | 844 | static struct platform_driver ds2780_battery_driver = { |
847 | .driver = { | 845 | .driver = { |
848 | .name = "ds2780-battery", | 846 | .name = "ds2780-battery", |
@@ -851,19 +849,9 @@ static struct platform_driver ds2780_battery_driver = { | |||
851 | .remove = __devexit_p(ds2780_battery_remove), | 849 | .remove = __devexit_p(ds2780_battery_remove), |
852 | }; | 850 | }; |
853 | 851 | ||
854 | static int __init ds2780_battery_init(void) | 852 | module_platform_driver(ds2780_battery_driver); |
855 | { | ||
856 | return platform_driver_register(&ds2780_battery_driver); | ||
857 | } | ||
858 | |||
859 | static void __exit ds2780_battery_exit(void) | ||
860 | { | ||
861 | platform_driver_unregister(&ds2780_battery_driver); | ||
862 | } | ||
863 | |||
864 | module_init(ds2780_battery_init); | ||
865 | module_exit(ds2780_battery_exit); | ||
866 | 853 | ||
867 | MODULE_LICENSE("GPL"); | 854 | MODULE_LICENSE("GPL"); |
868 | MODULE_AUTHOR("Clifton Barnes <cabarnes@indesign-llc.com>"); | 855 | MODULE_AUTHOR("Clifton Barnes <cabarnes@indesign-llc.com>"); |
869 | MODULE_DESCRIPTION("Maxim/Dallas DS2780 Stand-Alone Fuel Gauage IC driver"); | 856 | MODULE_DESCRIPTION("Maxim/Dallas DS2780 Stand-Alone Fuel Gauage IC driver"); |
857 | MODULE_ALIAS("platform:ds2780-battery"); | ||
diff --git a/drivers/power/gpio-charger.c b/drivers/power/gpio-charger.c index a64b8854cfd5..8672c9177dd7 100644 --- a/drivers/power/gpio-charger.c +++ b/drivers/power/gpio-charger.c | |||
@@ -185,17 +185,7 @@ static struct platform_driver gpio_charger_driver = { | |||
185 | }, | 185 | }, |
186 | }; | 186 | }; |
187 | 187 | ||
188 | static int __init gpio_charger_init(void) | 188 | module_platform_driver(gpio_charger_driver); |
189 | { | ||
190 | return platform_driver_register(&gpio_charger_driver); | ||
191 | } | ||
192 | module_init(gpio_charger_init); | ||
193 | |||
194 | static void __exit gpio_charger_exit(void) | ||
195 | { | ||
196 | platform_driver_unregister(&gpio_charger_driver); | ||
197 | } | ||
198 | module_exit(gpio_charger_exit); | ||
199 | 189 | ||
200 | MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>"); | 190 | MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>"); |
201 | MODULE_DESCRIPTION("Driver for chargers which report their online status through a GPIO"); | 191 | MODULE_DESCRIPTION("Driver for chargers which report their online status through a GPIO"); |
diff --git a/drivers/power/intel_mid_battery.c b/drivers/power/intel_mid_battery.c index 01fa671ec97f..d09649706bd3 100644 --- a/drivers/power/intel_mid_battery.c +++ b/drivers/power/intel_mid_battery.c | |||
@@ -779,18 +779,7 @@ static struct platform_driver platform_pmic_battery_driver = { | |||
779 | .remove = __devexit_p(platform_pmic_battery_remove), | 779 | .remove = __devexit_p(platform_pmic_battery_remove), |
780 | }; | 780 | }; |
781 | 781 | ||
782 | static int __init platform_pmic_battery_module_init(void) | 782 | module_platform_driver(platform_pmic_battery_driver); |
783 | { | ||
784 | return platform_driver_register(&platform_pmic_battery_driver); | ||
785 | } | ||
786 | |||
787 | static void __exit platform_pmic_battery_module_exit(void) | ||
788 | { | ||
789 | platform_driver_unregister(&platform_pmic_battery_driver); | ||
790 | } | ||
791 | |||
792 | module_init(platform_pmic_battery_module_init); | ||
793 | module_exit(platform_pmic_battery_module_exit); | ||
794 | 783 | ||
795 | MODULE_AUTHOR("Nithish Mahalingam <nithish.mahalingam@intel.com>"); | 784 | MODULE_AUTHOR("Nithish Mahalingam <nithish.mahalingam@intel.com>"); |
796 | MODULE_DESCRIPTION("Intel Moorestown PMIC Battery Driver"); | 785 | MODULE_DESCRIPTION("Intel Moorestown PMIC Battery Driver"); |
diff --git a/drivers/power/isp1704_charger.c b/drivers/power/isp1704_charger.c index f6d72b402a8e..6a4ef387a183 100644 --- a/drivers/power/isp1704_charger.c +++ b/drivers/power/isp1704_charger.c | |||
@@ -494,17 +494,7 @@ static struct platform_driver isp1704_charger_driver = { | |||
494 | .remove = __devexit_p(isp1704_charger_remove), | 494 | .remove = __devexit_p(isp1704_charger_remove), |
495 | }; | 495 | }; |
496 | 496 | ||
497 | static int __init isp1704_charger_init(void) | 497 | module_platform_driver(isp1704_charger_driver); |
498 | { | ||
499 | return platform_driver_register(&isp1704_charger_driver); | ||
500 | } | ||
501 | module_init(isp1704_charger_init); | ||
502 | |||
503 | static void __exit isp1704_charger_exit(void) | ||
504 | { | ||
505 | platform_driver_unregister(&isp1704_charger_driver); | ||
506 | } | ||
507 | module_exit(isp1704_charger_exit); | ||
508 | 498 | ||
509 | MODULE_ALIAS("platform:isp1704_charger"); | 499 | MODULE_ALIAS("platform:isp1704_charger"); |
510 | MODULE_AUTHOR("Nokia Corporation"); | 500 | MODULE_AUTHOR("Nokia Corporation"); |
diff --git a/drivers/power/jz4740-battery.c b/drivers/power/jz4740-battery.c index 763f894ed188..6b77029e6bdb 100644 --- a/drivers/power/jz4740-battery.c +++ b/drivers/power/jz4740-battery.c | |||
@@ -441,17 +441,7 @@ static struct platform_driver jz_battery_driver = { | |||
441 | }, | 441 | }, |
442 | }; | 442 | }; |
443 | 443 | ||
444 | static int __init jz_battery_init(void) | 444 | module_platform_driver(jz_battery_driver); |
445 | { | ||
446 | return platform_driver_register(&jz_battery_driver); | ||
447 | } | ||
448 | module_init(jz_battery_init); | ||
449 | |||
450 | static void __exit jz_battery_exit(void) | ||
451 | { | ||
452 | platform_driver_unregister(&jz_battery_driver); | ||
453 | } | ||
454 | module_exit(jz_battery_exit); | ||
455 | 445 | ||
456 | MODULE_ALIAS("platform:jz4740-battery"); | 446 | MODULE_ALIAS("platform:jz4740-battery"); |
457 | MODULE_LICENSE("GPL"); | 447 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/power/max8903_charger.c b/drivers/power/max8903_charger.c index f204ad16361a..3e23f43e98af 100644 --- a/drivers/power/max8903_charger.c +++ b/drivers/power/max8903_charger.c | |||
@@ -374,17 +374,7 @@ static struct platform_driver max8903_driver = { | |||
374 | }, | 374 | }, |
375 | }; | 375 | }; |
376 | 376 | ||
377 | static int __init max8903_init(void) | 377 | module_platform_driver(max8903_driver); |
378 | { | ||
379 | return platform_driver_register(&max8903_driver); | ||
380 | } | ||
381 | module_init(max8903_init); | ||
382 | |||
383 | static void __exit max8903_exit(void) | ||
384 | { | ||
385 | platform_driver_unregister(&max8903_driver); | ||
386 | } | ||
387 | module_exit(max8903_exit); | ||
388 | 378 | ||
389 | MODULE_LICENSE("GPL"); | 379 | MODULE_LICENSE("GPL"); |
390 | MODULE_DESCRIPTION("MAX8903 Charger Driver"); | 380 | MODULE_DESCRIPTION("MAX8903 Charger Driver"); |
diff --git a/drivers/power/max8925_power.c b/drivers/power/max8925_power.c index 815525094ff9..daa333bd7ebb 100644 --- a/drivers/power/max8925_power.c +++ b/drivers/power/max8925_power.c | |||
@@ -523,17 +523,7 @@ static struct platform_driver max8925_power_driver = { | |||
523 | }, | 523 | }, |
524 | }; | 524 | }; |
525 | 525 | ||
526 | static int __init max8925_power_init(void) | 526 | module_platform_driver(max8925_power_driver); |
527 | { | ||
528 | return platform_driver_register(&max8925_power_driver); | ||
529 | } | ||
530 | module_init(max8925_power_init); | ||
531 | |||
532 | static void __exit max8925_power_exit(void) | ||
533 | { | ||
534 | platform_driver_unregister(&max8925_power_driver); | ||
535 | } | ||
536 | module_exit(max8925_power_exit); | ||
537 | 527 | ||
538 | MODULE_LICENSE("GPL"); | 528 | MODULE_LICENSE("GPL"); |
539 | MODULE_DESCRIPTION("Power supply driver for MAX8925"); | 529 | MODULE_DESCRIPTION("Power supply driver for MAX8925"); |
diff --git a/drivers/power/max8998_charger.c b/drivers/power/max8998_charger.c index 0737302af1d2..9b3f2bf56e70 100644 --- a/drivers/power/max8998_charger.c +++ b/drivers/power/max8998_charger.c | |||
@@ -204,17 +204,7 @@ static struct platform_driver max8998_battery_driver = { | |||
204 | .id_table = max8998_battery_id, | 204 | .id_table = max8998_battery_id, |
205 | }; | 205 | }; |
206 | 206 | ||
207 | static int __init max8998_battery_init(void) | 207 | module_platform_driver(max8998_battery_driver); |
208 | { | ||
209 | return platform_driver_register(&max8998_battery_driver); | ||
210 | } | ||
211 | module_init(max8998_battery_init); | ||
212 | |||
213 | static void __exit max8998_battery_cleanup(void) | ||
214 | { | ||
215 | platform_driver_unregister(&max8998_battery_driver); | ||
216 | } | ||
217 | module_exit(max8998_battery_cleanup); | ||
218 | 208 | ||
219 | MODULE_DESCRIPTION("MAXIM 8998 battery control driver"); | 209 | MODULE_DESCRIPTION("MAXIM 8998 battery control driver"); |
220 | MODULE_AUTHOR("MyungJoo Ham <myungjoo.ham@samsung.com>"); | 210 | MODULE_AUTHOR("MyungJoo Ham <myungjoo.ham@samsung.com>"); |
diff --git a/drivers/power/olpc_battery.c b/drivers/power/olpc_battery.c index 21e7c06724bf..7385092f9bc8 100644 --- a/drivers/power/olpc_battery.c +++ b/drivers/power/olpc_battery.c | |||
@@ -630,17 +630,7 @@ static struct platform_driver olpc_battery_driver = { | |||
630 | .suspend = olpc_battery_suspend, | 630 | .suspend = olpc_battery_suspend, |
631 | }; | 631 | }; |
632 | 632 | ||
633 | static int __init olpc_bat_init(void) | 633 | module_platform_driver(olpc_battery_driver); |
634 | { | ||
635 | return platform_driver_register(&olpc_battery_driver); | ||
636 | } | ||
637 | module_init(olpc_bat_init); | ||
638 | |||
639 | static void __exit olpc_bat_exit(void) | ||
640 | { | ||
641 | platform_driver_unregister(&olpc_battery_driver); | ||
642 | } | ||
643 | module_exit(olpc_bat_exit); | ||
644 | 634 | ||
645 | MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>"); | 635 | MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>"); |
646 | MODULE_LICENSE("GPL"); | 636 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/power/pcf50633-charger.c b/drivers/power/pcf50633-charger.c index 4fa52e1781a2..3d1e9efb6f53 100644 --- a/drivers/power/pcf50633-charger.c +++ b/drivers/power/pcf50633-charger.c | |||
@@ -474,17 +474,7 @@ static struct platform_driver pcf50633_mbc_driver = { | |||
474 | .remove = __devexit_p(pcf50633_mbc_remove), | 474 | .remove = __devexit_p(pcf50633_mbc_remove), |
475 | }; | 475 | }; |
476 | 476 | ||
477 | static int __init pcf50633_mbc_init(void) | 477 | module_platform_driver(pcf50633_mbc_driver); |
478 | { | ||
479 | return platform_driver_register(&pcf50633_mbc_driver); | ||
480 | } | ||
481 | module_init(pcf50633_mbc_init); | ||
482 | |||
483 | static void __exit pcf50633_mbc_exit(void) | ||
484 | { | ||
485 | platform_driver_unregister(&pcf50633_mbc_driver); | ||
486 | } | ||
487 | module_exit(pcf50633_mbc_exit); | ||
488 | 478 | ||
489 | MODULE_AUTHOR("Balaji Rao <balajirrao@openmoko.org>"); | 479 | MODULE_AUTHOR("Balaji Rao <balajirrao@openmoko.org>"); |
490 | MODULE_DESCRIPTION("PCF50633 mbc driver"); | 480 | MODULE_DESCRIPTION("PCF50633 mbc driver"); |
diff --git a/drivers/power/pda_power.c b/drivers/power/pda_power.c index 87be6795605a..fd49689738af 100644 --- a/drivers/power/pda_power.c +++ b/drivers/power/pda_power.c | |||
@@ -498,8 +498,6 @@ static int pda_power_resume(struct platform_device *pdev) | |||
498 | #define pda_power_resume NULL | 498 | #define pda_power_resume NULL |
499 | #endif /* CONFIG_PM */ | 499 | #endif /* CONFIG_PM */ |
500 | 500 | ||
501 | MODULE_ALIAS("platform:pda-power"); | ||
502 | |||
503 | static struct platform_driver pda_power_pdrv = { | 501 | static struct platform_driver pda_power_pdrv = { |
504 | .driver = { | 502 | .driver = { |
505 | .name = "pda-power", | 503 | .name = "pda-power", |
@@ -510,17 +508,8 @@ static struct platform_driver pda_power_pdrv = { | |||
510 | .resume = pda_power_resume, | 508 | .resume = pda_power_resume, |
511 | }; | 509 | }; |
512 | 510 | ||
513 | static int __init pda_power_init(void) | 511 | module_platform_driver(pda_power_pdrv); |
514 | { | ||
515 | return platform_driver_register(&pda_power_pdrv); | ||
516 | } | ||
517 | |||
518 | static void __exit pda_power_exit(void) | ||
519 | { | ||
520 | platform_driver_unregister(&pda_power_pdrv); | ||
521 | } | ||
522 | 512 | ||
523 | module_init(pda_power_init); | ||
524 | module_exit(pda_power_exit); | ||
525 | MODULE_LICENSE("GPL"); | 513 | MODULE_LICENSE("GPL"); |
526 | MODULE_AUTHOR("Anton Vorontsov <cbou@mail.ru>"); | 514 | MODULE_AUTHOR("Anton Vorontsov <cbou@mail.ru>"); |
515 | MODULE_ALIAS("platform:pda-power"); | ||
diff --git a/drivers/power/s3c_adc_battery.c b/drivers/power/s3c_adc_battery.c index d32d0d70f9ba..e687ee7f18f2 100644 --- a/drivers/power/s3c_adc_battery.c +++ b/drivers/power/s3c_adc_battery.c | |||
@@ -421,17 +421,7 @@ static struct platform_driver s3c_adc_bat_driver = { | |||
421 | .resume = s3c_adc_bat_resume, | 421 | .resume = s3c_adc_bat_resume, |
422 | }; | 422 | }; |
423 | 423 | ||
424 | static int __init s3c_adc_bat_init(void) | 424 | module_platform_driver(s3c_adc_bat_driver); |
425 | { | ||
426 | return platform_driver_register(&s3c_adc_bat_driver); | ||
427 | } | ||
428 | module_init(s3c_adc_bat_init); | ||
429 | |||
430 | static void __exit s3c_adc_bat_exit(void) | ||
431 | { | ||
432 | platform_driver_unregister(&s3c_adc_bat_driver); | ||
433 | } | ||
434 | module_exit(s3c_adc_bat_exit); | ||
435 | 425 | ||
436 | MODULE_AUTHOR("Vasily Khoruzhick <anarsoul@gmail.com>"); | 426 | MODULE_AUTHOR("Vasily Khoruzhick <anarsoul@gmail.com>"); |
437 | MODULE_DESCRIPTION("iPAQ H1930/H1940/RX1950 battery controller driver"); | 427 | MODULE_DESCRIPTION("iPAQ H1930/H1940/RX1950 battery controller driver"); |
diff --git a/drivers/power/tosa_battery.c b/drivers/power/tosa_battery.c index ada86a4f50e2..28bbe7e094e3 100644 --- a/drivers/power/tosa_battery.c +++ b/drivers/power/tosa_battery.c | |||
@@ -438,18 +438,7 @@ static struct platform_driver tosa_bat_driver = { | |||
438 | .resume = tosa_bat_resume, | 438 | .resume = tosa_bat_resume, |
439 | }; | 439 | }; |
440 | 440 | ||
441 | static int __init tosa_bat_init(void) | 441 | module_platform_driver(tosa_bat_driver); |
442 | { | ||
443 | return platform_driver_register(&tosa_bat_driver); | ||
444 | } | ||
445 | |||
446 | static void __exit tosa_bat_exit(void) | ||
447 | { | ||
448 | platform_driver_unregister(&tosa_bat_driver); | ||
449 | } | ||
450 | |||
451 | module_init(tosa_bat_init); | ||
452 | module_exit(tosa_bat_exit); | ||
453 | 442 | ||
454 | MODULE_LICENSE("GPL"); | 443 | MODULE_LICENSE("GPL"); |
455 | MODULE_AUTHOR("Dmitry Baryshkov"); | 444 | MODULE_AUTHOR("Dmitry Baryshkov"); |
diff --git a/drivers/power/wm831x_backup.c b/drivers/power/wm831x_backup.c index e648cbea1e6a..6243e6975126 100644 --- a/drivers/power/wm831x_backup.c +++ b/drivers/power/wm831x_backup.c | |||
@@ -226,17 +226,7 @@ static struct platform_driver wm831x_backup_driver = { | |||
226 | }, | 226 | }, |
227 | }; | 227 | }; |
228 | 228 | ||
229 | static int __init wm831x_backup_init(void) | 229 | module_platform_driver(wm831x_backup_driver); |
230 | { | ||
231 | return platform_driver_register(&wm831x_backup_driver); | ||
232 | } | ||
233 | module_init(wm831x_backup_init); | ||
234 | |||
235 | static void __exit wm831x_backup_exit(void) | ||
236 | { | ||
237 | platform_driver_unregister(&wm831x_backup_driver); | ||
238 | } | ||
239 | module_exit(wm831x_backup_exit); | ||
240 | 230 | ||
241 | MODULE_DESCRIPTION("Backup battery charger driver for WM831x PMICs"); | 231 | MODULE_DESCRIPTION("Backup battery charger driver for WM831x PMICs"); |
242 | MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); | 232 | MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); |
diff --git a/drivers/power/wm831x_power.c b/drivers/power/wm831x_power.c index c32e6f83c7a8..987332b71d8d 100644 --- a/drivers/power/wm831x_power.c +++ b/drivers/power/wm831x_power.c | |||
@@ -655,17 +655,7 @@ static struct platform_driver wm831x_power_driver = { | |||
655 | }, | 655 | }, |
656 | }; | 656 | }; |
657 | 657 | ||
658 | static int __init wm831x_power_init(void) | 658 | module_platform_driver(wm831x_power_driver); |
659 | { | ||
660 | return platform_driver_register(&wm831x_power_driver); | ||
661 | } | ||
662 | module_init(wm831x_power_init); | ||
663 | |||
664 | static void __exit wm831x_power_exit(void) | ||
665 | { | ||
666 | platform_driver_unregister(&wm831x_power_driver); | ||
667 | } | ||
668 | module_exit(wm831x_power_exit); | ||
669 | 659 | ||
670 | MODULE_DESCRIPTION("Power supply driver for WM831x PMICs"); | 660 | MODULE_DESCRIPTION("Power supply driver for WM831x PMICs"); |
671 | MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); | 661 | MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); |
diff --git a/drivers/power/wm8350_power.c b/drivers/power/wm8350_power.c index 0693902d6151..fae04d384657 100644 --- a/drivers/power/wm8350_power.c +++ b/drivers/power/wm8350_power.c | |||
@@ -522,17 +522,7 @@ static struct platform_driver wm8350_power_driver = { | |||
522 | }, | 522 | }, |
523 | }; | 523 | }; |
524 | 524 | ||
525 | static int __init wm8350_power_init(void) | 525 | module_platform_driver(wm8350_power_driver); |
526 | { | ||
527 | return platform_driver_register(&wm8350_power_driver); | ||
528 | } | ||
529 | module_init(wm8350_power_init); | ||
530 | |||
531 | static void __exit wm8350_power_exit(void) | ||
532 | { | ||
533 | platform_driver_unregister(&wm8350_power_driver); | ||
534 | } | ||
535 | module_exit(wm8350_power_exit); | ||
536 | 526 | ||
537 | MODULE_LICENSE("GPL"); | 527 | MODULE_LICENSE("GPL"); |
538 | MODULE_DESCRIPTION("Power supply driver for WM8350"); | 528 | MODULE_DESCRIPTION("Power supply driver for WM8350"); |
diff --git a/drivers/power/wm97xx_battery.c b/drivers/power/wm97xx_battery.c index cf8681c1f8eb..199818f9d181 100644 --- a/drivers/power/wm97xx_battery.c +++ b/drivers/power/wm97xx_battery.c | |||
@@ -291,18 +291,7 @@ static struct platform_driver wm97xx_bat_driver = { | |||
291 | .remove = __devexit_p(wm97xx_bat_remove), | 291 | .remove = __devexit_p(wm97xx_bat_remove), |
292 | }; | 292 | }; |
293 | 293 | ||
294 | static int __init wm97xx_bat_init(void) | 294 | module_platform_driver(wm97xx_bat_driver); |
295 | { | ||
296 | return platform_driver_register(&wm97xx_bat_driver); | ||
297 | } | ||
298 | |||
299 | static void __exit wm97xx_bat_exit(void) | ||
300 | { | ||
301 | platform_driver_unregister(&wm97xx_bat_driver); | ||
302 | } | ||
303 | |||
304 | module_init(wm97xx_bat_init); | ||
305 | module_exit(wm97xx_bat_exit); | ||
306 | 295 | ||
307 | MODULE_LICENSE("GPL"); | 296 | MODULE_LICENSE("GPL"); |
308 | MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>"); | 297 | MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>"); |