Skip to content

Commit

Permalink
da9052-battery: Convert to use module_platform_driver
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Axel Lin authored and Anton Vorontsov committed Mar 26, 2012
1 parent 61bb5a7 commit 534f530
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions drivers/power/da9052-battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>");
Expand Down

0 comments on commit 534f530

Please sign in to comment.