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