summaryrefslogtreecommitdiffstats
path: root/drivers/power/ds2780_battery.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-11-26 12:01:10 +0800
committerAnton Vorontsov <cbouatmailru@gmail.com>2012-01-04 09:12:07 +0400
commit300bac7fb85a20b2704dc3645419057992f78565 (patch)
treed0c3e327967552ab9ba68866b6c77a951446a7cd /drivers/power/ds2780_battery.c
parent251f39fe42dae863bd24e30864e6b66076ba076d (diff)
downloadlinux-300bac7fb85a20b2704dc3645419057992f78565.tar.gz
linux-300bac7fb85a20b2704dc3645419057992f78565.tar.bz2
linux-300bac7fb85a20b2704dc3645419057992f78565.zip
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/power/ds2780_battery.c')
-rw-r--r--drivers/power/ds2780_battery.c16
1 files changed, 2 insertions, 14 deletions
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)
return 0;
}
-MODULE_ALIAS("platform:ds2780-battery");
-
static struct platform_driver ds2780_battery_driver = {
.driver = {
.name = "ds2780-battery",
@@ -851,19 +849,9 @@ static struct platform_driver ds2780_battery_driver = {
.remove = __devexit_p(ds2780_battery_remove),
};
-static int __init ds2780_battery_init(void)
-{
- return platform_driver_register(&ds2780_battery_driver);
-}
-
-static void __exit ds2780_battery_exit(void)
-{
- platform_driver_unregister(&ds2780_battery_driver);
-}
-
-module_init(ds2780_battery_init);
-module_exit(ds2780_battery_exit);
+module_platform_driver(ds2780_battery_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Clifton Barnes <cabarnes@indesign-llc.com>");
MODULE_DESCRIPTION("Maxim/Dallas DS2780 Stand-Alone Fuel Gauage IC driver");
+MODULE_ALIAS("platform:ds2780-battery");