[PATCH] soc: mediatek: PMIC wrap: convert to arch_initcall

Henry Chen henryc.chen at mediatek.com
Wed Dec 23 00:57:29 PST 2015


Move pmic wrap initialization earlier in boot so that real devices
can use pmic without probe deferring.

Signed-off-by: Henry Chen <henryc.chen at mediatek.com>
---
 drivers/soc/mediatek/mtk-pmic-wrap.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index ccd5337..a8cde17 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -945,7 +945,11 @@ static struct platform_driver pwrap_drv = {
 	.probe = pwrap_probe,
 };
 
-module_platform_driver(pwrap_drv);
+static int __init mtk_pmic_wrap_init(void)
+{
+	return platform_driver_register(&pwrap_drv);
+}
+arch_initcall(mtk_pmic_wrap_init);
 
 MODULE_AUTHOR("Flora Fu, MediaTek");
 MODULE_DESCRIPTION("MediaTek MT8135 PMIC Wrapper Driver");
-- 
1.9.1




More information about the linux-arm-kernel mailing list