Skip to contentSkip to conversation

power: abx500_chargalg: use module_platform_driver() macro

PATCH In review Jingoo Han 2 participants 2 messages Mar 11, 2013 – Apr 1, 2013

lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/1 power: abx500_chargalg: use module_platform_driver() macro

This patch uses module_platform_driver() macro which makes the code smaller and simpler.

---
 drivers/power/abx500_chargalg.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/power/abx500_chargalg.c +1 -12
index f043c08..3d8e2f3 100644
@@ -1964,18 +1964,7 @@ static struct platform_driver abx500_chargalg_driver = {
 	},
 };
 
-static int __init abx500_chargalg_init(void)
-{
-	return platform_driver_register(&abx500_chargalg_driver);
-}
-
-static void __exit abx500_chargalg_exit(void)
-{
-	platform_driver_unregister(&abx500_chargalg_driver);
-}
-
-module_init(abx500_chargalg_init);
-module_exit(abx500_chargalg_exit);
+module_platform_driver(abx500_chargalg_driver);
 
 MODULE_LICENSE("GPL v2");
 MODULE_AUTHOR("Johan Palsson, Karl Komierowski");
Signature · 1 line
1.7.2.5
#1 lore raw
Quoted 5 lines · Jingoo Han

This patch uses module_platform_driver() macro which makes the code smaller and simpler.

---

Similar change was in a "big ab8500 sync"..

commit 1ee26af028a46cf911f844c062b3c810bac34366

Author: srinidhi kasagar <[email protected]>
Date:   Thu Oct 11 14:38:28 2012 +0530

abx500-chargalg: Use module_platform_driver() rather

Thanks,

Anton