diff mbox series

[v6,2/5] firmware: meson_sm: populate platform device based on the child node

Message ID 1578973527-4759-3-git-send-email-xingyu.chen@amlogic.com (mailing list archive)
State New, archived
Headers show
Series add meson secure watchdog driver | expand

Commit Message

Xingyu Chen Jan. 14, 2020, 3:45 a.m. UTC
The child node of secure-monitor cann't be populated as platform device
automatically during the kernel initialization phase, so we invoke
of_platform_default_populate() to do it.

Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
---
 drivers/firmware/meson/meson_sm.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/firmware/meson/meson_sm.c b/drivers/firmware/meson/meson_sm.c
index 8cdd405..d2b1e76 100644
--- a/drivers/firmware/meson/meson_sm.c
+++ b/drivers/firmware/meson/meson_sm.c
@@ -310,6 +310,8 @@  static int __init meson_sm_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, fw);
 
+	of_platform_default_populate(dev->of_node, NULL, dev);
+
 	pr_info("secure-monitor enabled\n");
 
 	if (sysfs_create_group(&pdev->dev.kobj, &meson_sm_sysfs_attr_group))