From: Yang Yingliang Date: Mon, 7 Aug 2023 13:19:48 +0000 (+0800) Subject: power: reset: msm: use builtin_platform_driver() to simplify code X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4e579a5c68d88b340776c2270659de111f8923f6;p=linux.git power: reset: msm: use builtin_platform_driver() to simplify code 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 Link: https://lore.kernel.org/r/20230807131951.3443880-3-yangyingliang@huawei.com Signed-off-by: Sebastian Reichel --- diff --git a/drivers/power/reset/msm-poweroff.c b/drivers/power/reset/msm-poweroff.c index b9a401bd280bd..d96d248a6e25b 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);