diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2023-08-07 15:19:47 +0200 |
---|---|---|
committer | Sebastian Reichel <sebastian.reichel@collabora.com> | 2023-09-12 20:25:54 +0200 |
commit | 70c81c37cf252798bef5fe047a57129ff6a2b31b (patch) | |
tree | 0c854bead20caed997da6fa43a955c81789f124d /drivers/power | |
parent | power: reset: nvmem-reboot-mode: quiet some device deferrals (diff) | |
download | linux-70c81c37cf252798bef5fe047a57129ff6a2b31b.tar.xz linux-70c81c37cf252798bef5fe047a57129ff6a2b31b.zip |
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')
-rw-r--r-- | drivers/power/reset/st-poweroff.c | 7 |
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"); |