All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tee: optee: Populate child nodes in probe function
@ 2022-11-09 16:07 Ludvig Pärsson
  2022-11-10 10:53 ` Sumit Garg
  2022-11-11 16:13 ` Sudeep Holla
  0 siblings, 2 replies; 7+ messages in thread
From: Ludvig Pärsson @ 2022-11-09 16:07 UTC (permalink / raw)
  To: Jens Wiklander
  Cc: kernel, Ludvig Pärsson, Sumit Garg, op-tee, linux-kernel

Currently there is no dependency between the "linaro,scmi-optee" driver
and the tee_core. If the scmi-optee driver gets probed before the
tee_bus_type is initialized, then we will get an unwanted error print.

This patch enables putting scmi-optee nodes as children to the optee
node in devicetree, which indirectly creates the missing dependency.

Signed-off-by: Ludvig Pärsson <ludvig.parsson@axis.com>
---
 drivers/tee/optee/smc_abi.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/tee/optee/smc_abi.c b/drivers/tee/optee/smc_abi.c
index a1c1fa1a9c28..be6f02fd5a7f 100644
--- a/drivers/tee/optee/smc_abi.c
+++ b/drivers/tee/optee/smc_abi.c
@@ -1533,6 +1533,11 @@ static int optee_probe(struct platform_device *pdev)
 	if (rc)
 		goto err_disable_shm_cache;
 
+	/* Populate any dependent child node (if any) */
+	rc = devm_of_platform_populate(&pdev->dev);
+	if (rc)
+		goto err_disable_shm_cache;
+
 	pr_info("initialized driver\n");
 	return 0;
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-11-14  6:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-09 16:07 [PATCH] tee: optee: Populate child nodes in probe function Ludvig Pärsson
2022-11-10 10:53 ` Sumit Garg
2022-11-10 12:09   ` Ludvig Pärsson
2022-11-11  9:57     ` Sumit Garg
2022-11-11 13:16       ` Ludvig Pärsson
2022-11-11 16:13 ` Sudeep Holla
2022-11-14  6:38   ` Sumit Garg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.