]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
power: reset: st-poweroff: use builtin_platform_driver() to simplify code
authorYang Yingliang <yangyingliang@huawei.com>
Mon, 7 Aug 2023 13:19:47 +0000 (21:19 +0800)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Tue, 12 Sep 2023 18:25:54 +0000 (20:25 +0200)
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>
drivers/power/reset/st-poweroff.c

index 56ba2187388270bb364746849cbf49940b850782..85175066beeab6360b3bae0e411dd9a4d5dd560e 100644 (file)
@@ -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");