diff mbox series

[-next,2/5] power: reset: msm: use builtin_platform_driver() to simplify code

Message ID 20230807131951.3443880-3-yangyingliang@huawei.com (mailing list archive)
State Handled Elsewhere, archived
Headers show
Series power: reset: use builtin_platform_driver() to simplify code | expand

Commit Message

Yang Yingliang Aug. 7, 2023, 1:19 p.m. UTC
The msm_restart_init() doesn't do anything special, so it can use the
builtin_platform_driver() macro to eliminate boilerplate code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/power/reset/msm-poweroff.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/drivers/power/reset/msm-poweroff.c b/drivers/power/reset/msm-poweroff.c
index b9a401bd280b..d96d248a6e25 100644
--- a/drivers/power/reset/msm-poweroff.c
+++ b/drivers/power/reset/msm-poweroff.c
@@ -59,9 +59,4 @@  static struct platform_driver msm_restart_driver = {
 		.of_match_table = of_match_ptr(of_msm_restart_match),
 	},
 };
-
-static int __init msm_restart_init(void)
-{
-	return platform_driver_register(&msm_restart_driver);
-}
-device_initcall(msm_restart_init);
+builtin_platform_driver(msm_restart_driver);