Commit 534f5306 authored by Axel Lin's avatar Axel Lin Committed by Anton Vorontsov

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: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarAnton Vorontsov <anton.vorontsov@linaro.org>
parent 61bb5a78
...@@ -647,18 +647,7 @@ static struct platform_driver da9052_bat_driver = { ...@@ -647,18 +647,7 @@ static struct platform_driver da9052_bat_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
}, },
}; };
module_platform_driver(da9052_bat_driver);
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_DESCRIPTION("DA9052 BAT Device Driver"); MODULE_DESCRIPTION("DA9052 BAT Device Driver");
MODULE_AUTHOR("David Dajun Chen <dchen@diasemi.com>"); MODULE_AUTHOR("David Dajun Chen <dchen@diasemi.com>");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment