[PATCH] power: ab8500_btemp: use builtin_platform_driver
From: Geliang Tang
Date: Wed Nov 23 2016 - 09:57:21 EST
Use builtin_platform_driver() helper to simplify the code.
Signed-off-by: Geliang Tang <geliangtang@xxxxxxxxx>
---
drivers/power/supply/ab8500_btemp.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/power/supply/ab8500_btemp.c b/drivers/power/supply/ab8500_btemp.c
index 6ffdc18..f925e50 100644
--- a/drivers/power/supply/ab8500_btemp.c
+++ b/drivers/power/supply/ab8500_btemp.c
@@ -1193,17 +1193,12 @@ static struct platform_driver ab8500_btemp_driver = {
},
};
-static int __init ab8500_btemp_init(void)
-{
- return platform_driver_register(&ab8500_btemp_driver);
-}
-
static void __exit ab8500_btemp_exit(void)
{
platform_driver_unregister(&ab8500_btemp_driver);
}
-device_initcall(ab8500_btemp_init);
+builtin_platform_driver(ab8500_btemp_driver);
module_exit(ab8500_btemp_exit);
MODULE_LICENSE("GPL v2");
--
2.9.3