aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power/ds2781_battery.c
diff options
context:
space:
mode:
authorDevendra Naga <develkernel412222@gmail.com>2012-07-30 06:44:10 -0400
committerAnton Vorontsov <anton.vorontsov@linaro.org>2012-08-22 22:47:09 -0400
commitbc6e51d8891629a9d117dc75a8a2eb9a411a3510 (patch)
treee9f1a1277719b6ca70281889a590399320c7fd1f /drivers/power/ds2781_battery.c
parent94b05cabc07d7ebb4f9d2f2dce6ab7db20f7fbac (diff)
ds2781_battery: Convert to module_platform_driver
module_platform_driver can be used to replace the platform_driver register and unregister functions, with the calls to module_init and module_exit, i.e. all the code that is doing like the below static int __init mymod_init(void) { return platform_driver_register(&drv_operations); } static void __exit mymod_exit(void) { platform_driver_unregister(&drv_operations); } module_init(mymod_init); module_exit(mymod_exit); can be replaced with module_platform_driver(drv_operations)... Signed-off-by: Devendra Naga <develkernel412222@gmail.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Diffstat (limited to 'drivers/power/ds2781_battery.c')
-rw-r--r--drivers/power/ds2781_battery.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/power/ds2781_battery.c b/drivers/power/ds2781_battery.c
index 7a1ff4e4cf9a..88e304aea2dc 100644
--- a/drivers/power/ds2781_battery.c
+++ b/drivers/power/ds2781_battery.c
@@ -834,20 +834,7 @@ static struct platform_driver ds2781_battery_driver = {
834 .probe = ds2781_battery_probe, 834 .probe = ds2781_battery_probe,
835 .remove = __devexit_p(ds2781_battery_remove), 835 .remove = __devexit_p(ds2781_battery_remove),
836}; 836};
837 837module_platform_driver(ds2781_battery_driver);
838static int __init ds2781_battery_init(void)
839{
840 return platform_driver_register(&ds2781_battery_driver);
841}
842
843static void __exit ds2781_battery_exit(void)
844{
845 platform_driver_unregister(&ds2781_battery_driver);
846}
847
848module_init(ds2781_battery_init);
849module_exit(ds2781_battery_exit);
850
851 838
852MODULE_LICENSE("GPL"); 839MODULE_LICENSE("GPL");
853MODULE_AUTHOR("Renata Sayakhova <renata@oktetlabs.ru>"); 840MODULE_AUTHOR("Renata Sayakhova <renata@oktetlabs.ru>");