diff mbox series

[-next,1/5] power: reset: st-poweroff: use builtin_platform_driver() to simplify code

Message ID 20230807131951.3443880-2-yangyingliang@huawei.com (mailing list archive)
State Handled Elsewhere, archived
Headers show
Series power: reset: use builtin_platform_driver() to simplify code | expand

Commit Message

Yang Yingliang Aug. 7, 2023, 1:19 p.m. UTC
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>
---
 drivers/power/reset/st-poweroff.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
diff mbox series

Patch

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");