Skip to content

Commit

Permalink
twl4030_charger: Use module_platform_driver_probe()
Browse files Browse the repository at this point in the history
This patch uses module_platform_driver_probe() macro which makes the code
smaller and simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
  • Loading branch information
Jingoo Han authored and Anton Vorontsov committed Apr 1, 2013
1 parent 9c1d1af commit 4420dc2
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions drivers/power/twl4030_charger.c
Original file line number Diff line number Diff line change
Expand Up @@ -636,17 +636,7 @@ static struct platform_driver twl4030_bci_driver = {
.remove = __exit_p(twl4030_bci_remove),
};

static int __init twl4030_bci_init(void)
{
return platform_driver_probe(&twl4030_bci_driver, twl4030_bci_probe);
}
module_init(twl4030_bci_init);

static void __exit twl4030_bci_exit(void)
{
platform_driver_unregister(&twl4030_bci_driver);
}
module_exit(twl4030_bci_exit);
module_platform_driver_probe(twl4030_bci_driver, twl4030_bci_probe);

MODULE_AUTHOR("Gražvydas Ignotas");
MODULE_DESCRIPTION("TWL4030 Battery Charger Interface driver");
Expand Down

0 comments on commit 4420dc2

Please sign in to comment.