aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2023-08-07 21:19:48 +0800
committerSebastian Reichel <sebastian.reichel@collabora.com>2023-09-12 20:25:54 +0200
commit4e579a5c68d88b340776c2270659de111f8923f6 (patch)
tree75b4ecf1f20de79d6ecd7d32b609dcc68c448819 /drivers/power
parent70c81c37cf252798bef5fe047a57129ff6a2b31b (diff)
downloadlinux-4e579a5c68d88b340776c2270659de111f8923f6.tar.gz
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 <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230807131951.3443880-3-yangyingliang@huawei.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/reset/msm-poweroff.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/power/reset/msm-poweroff.c b/drivers/power/reset/msm-poweroff.c
index b9a401bd280bd1..d96d248a6e25b9 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);