summaryrefslogtreecommitdiff
path: root/drivers/power/reset/st-poweroff.c
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2023-08-07 16:19:47 +0300
committerSebastian Reichel <sebastian.reichel@collabora.com>2023-09-12 21:25:54 +0300
commit70c81c37cf252798bef5fe047a57129ff6a2b31b (patch)
tree0c854bead20caed997da6fa43a955c81789f124d /drivers/power/reset/st-poweroff.c
parent8e511f42ac9cdab84c692bcd0f9e0c55c75b1856 (diff)
downloadlinux-70c81c37cf252798bef5fe047a57129ff6a2b31b.tar.xz
power: reset: st-poweroff: use builtin_platform_driver() to simplify code
The st_reset_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-2-yangyingliang@huawei.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power/reset/st-poweroff.c')
-rw-r--r--drivers/power/reset/st-poweroff.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/power/reset/st-poweroff.c b/drivers/power/reset/st-poweroff.c
index 56ba21873882..85175066beea 100644
--- a/drivers/power/reset/st-poweroff.c
+++ b/drivers/power/reset/st-poweroff.c
@@ -100,12 +100,7 @@ static struct platform_driver st_reset_driver = {
},
};
-static int __init st_reset_init(void)
-{
- return platform_driver_register(&st_reset_driver);
-}
-
-device_initcall(st_reset_init);
+builtin_platform_driver(st_reset_driver);
MODULE_AUTHOR("Christophe Kerello <christophe.kerello@st.com>");
MODULE_DESCRIPTION("STMicroelectronics Power off Restart driver");