power: reset: msm: use builtin_platform_driver() to simplify code
authorYang Yingliang <yangyingliang@huawei.com>
Mon, 7 Aug 2023 13:19:48 +0000 (21:19 +0800)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Tue, 12 Sep 2023 18:25:54 +0000 (20:25 +0200)
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>
Link: https://lore.kernel.org/r/20230807131951.3443880-3-yangyingliang@huawei.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/reset/msm-poweroff.c

index b9a401bd280bd17f687bfad3756a6d30639d2c7f..d96d248a6e25b9da15f4dea2a4953152e4fdb5e0 100644 (file)
@@ -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);