[PATCH 1/8] firmware: imx: scu: change init level to subsys_initcall_sync

Peng Fan (OSS) peng.fan at oss.nxp.com
Thu Jul 20 02:41:21 PDT 2023


From: Dong Aisheng <aisheng.dong at nxp.com>

Change firmware init level to subsys_initcall_sync to ensure it's
probed before most devices to avoid unneccessary defer probe.

Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
Signed-off-by: Peng Fan <peng.fan at nxp.com>
---
 drivers/firmware/imx/imx-scu.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/firmware/imx/imx-scu.c b/drivers/firmware/imx/imx-scu.c
index 47db49911e7b..2d24359420d8 100644
--- a/drivers/firmware/imx/imx-scu.c
+++ b/drivers/firmware/imx/imx-scu.c
@@ -353,7 +353,12 @@ static struct platform_driver imx_scu_driver = {
 	},
 	.probe = imx_scu_probe,
 };
-builtin_platform_driver(imx_scu_driver);
+
+static int __init imx_scu_driver_init(void)
+{
+	return platform_driver_register(&imx_scu_driver);
+}
+subsys_initcall_sync(imx_scu_driver_init);
 
 MODULE_AUTHOR("Dong Aisheng <aisheng.dong at nxp.com>");
 MODULE_DESCRIPTION("IMX SCU firmware protocol driver");
-- 
2.37.1




More information about the linux-arm-kernel mailing list