Thread (20 messages) 20 messages, 9 authors, 2021-04-20
STALE1884d

[RFC v1 PATCH 2/3] caam: add defer probe when the caam driver cannot identify SoC

From: Alice Guo (OSS) <hidden>
Date: 2021-04-19 04:28:39
Also in: dmaengine, dri-devel, linux-amlogic, linux-clk, linux-crypto, linux-gpio, linux-iommu, linux-media, linux-mediatek, linux-mmc, linux-omap, linux-phy, linux-pm, linux-renesas-soc, linux-staging, linux-usb, linux-watchdog, linuxppc-dev, lkml
Subsystem: crypto api, freescale caam (cryptographic acceleration and assurance module) driver, the rest · Maintainers: Herbert Xu, "David S. Miller", Horia Geantă, Pankaj Gupta, Gaurav Jain, Linus Torvalds

From: Alice Guo <redacted>

When imx8_soc_info_driver uses module_platform_driver() to regitser
itself, the caam driver cannot identify the SoC in the machine because
the SoC driver is probed later, so that add return -EPROBE_DEFER.

Signed-off-by: Alice Guo <redacted>
---
 drivers/crypto/caam/ctrl.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c
index ca0361b2dbb0..d08f8cc4131f 100644
--- a/drivers/crypto/caam/ctrl.c
+++ b/drivers/crypto/caam/ctrl.c
@@ -635,6 +635,9 @@ static int caam_probe(struct platform_device *pdev)
 	nprop = pdev->dev.of_node;
 
 	imx_soc_match = soc_device_match(caam_imx_soc_table);
+	if (IS_ERR(imx_soc_match))
+		return PTR_ERR(imx_soc_match);
+
 	caam_imx = (bool)imx_soc_match;
 
 	if (imx_soc_match) {
-- 
2.17.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help