twl4030_charger: Use module_platform_driver_probe()
authorJingoo Han <jg1.han@samsung.com>
Tue, 5 Mar 2013 04:01:36 +0000 (13:01 +0900)
committerAnton Vorontsov <anton@enomsg.org>
Mon, 1 Apr 2013 06:04:20 +0000 (23:04 -0700)
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>
drivers/power/twl4030_charger.c

index a69d0d1..bed4581 100644 (file)
@@ -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");