diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-01-11 15:45:56 +0800 |
---|---|---|
committer | Anton Vorontsov <anton.vorontsov@linaro.org> | 2012-03-26 20:41:17 +0400 |
commit | 534f5306d701e2717b039898888bfbb8584186bd (patch) | |
tree | 0ffa9e1a4dbec2eafc4f389770ce314627450c58 /drivers/power/da9052-battery.c | |
parent | 61bb5a780dd4f50aa4dc859c28f1e8820d763b42 (diff) | |
download | linux-3.10-534f5306d701e2717b039898888bfbb8584186bd.tar.gz linux-3.10-534f5306d701e2717b039898888bfbb8584186bd.tar.bz2 linux-3.10-534f5306d701e2717b039898888bfbb8584186bd.zip |
da9052-battery: Convert to use module_platform_driver
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: Anton Vorontsov <anton.vorontsov@linaro.org>
Diffstat (limited to 'drivers/power/da9052-battery.c')
-rw-r--r-- | drivers/power/da9052-battery.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/power/da9052-battery.c b/drivers/power/da9052-battery.c index daf52a4b17b..a5f6a0ec157 100644 --- a/drivers/power/da9052-battery.c +++ b/drivers/power/da9052-battery.c @@ -647,18 +647,7 @@ static struct platform_driver da9052_bat_driver = { .owner = THIS_MODULE, }, }; - -static int __init da9052_bat_init(void) -{ - return platform_driver_register(&da9052_bat_driver); -} -module_init(da9052_bat_init); - -static void __exit da9052_bat_exit(void) -{ - platform_driver_unregister(&da9052_bat_driver); -} -module_exit(da9052_bat_exit); +module_platform_driver(da9052_bat_driver); MODULE_DESCRIPTION("DA9052 BAT Device Driver"); MODULE_AUTHOR("David Dajun Chen <dchen@diasemi.com>"); |