提交 0a2f9f57 编写于 作者: E Etienne Carriere 提交者: Herbert Xu

crypto: stm32/cryp - defer probe for reset controller

Change stm32 CRYP driver to defer its probe operation when
reset controller device is registered but has not been probed yet.
Signed-off-by: NEtienne Carriere <etienne.carriere@foss.st.com>
Signed-off-by: NNicolas Toromanoff <nicolas.toromanoff@foss.st.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 3219c2b1
...@@ -1973,7 +1973,11 @@ static int stm32_cryp_probe(struct platform_device *pdev) ...@@ -1973,7 +1973,11 @@ static int stm32_cryp_probe(struct platform_device *pdev)
pm_runtime_enable(dev); pm_runtime_enable(dev);
rst = devm_reset_control_get(dev, NULL); rst = devm_reset_control_get(dev, NULL);
if (!IS_ERR(rst)) { if (IS_ERR(rst)) {
ret = PTR_ERR(rst);
if (ret == -EPROBE_DEFER)
goto err_rst;
} else {
reset_control_assert(rst); reset_control_assert(rst);
udelay(2); udelay(2);
reset_control_deassert(rst); reset_control_deassert(rst);
...@@ -2024,7 +2028,7 @@ static int stm32_cryp_probe(struct platform_device *pdev) ...@@ -2024,7 +2028,7 @@ static int stm32_cryp_probe(struct platform_device *pdev)
spin_lock(&cryp_list.lock); spin_lock(&cryp_list.lock);
list_del(&cryp->list); list_del(&cryp->list);
spin_unlock(&cryp_list.lock); spin_unlock(&cryp_list.lock);
err_rst:
pm_runtime_disable(dev); pm_runtime_disable(dev);
pm_runtime_put_noidle(dev); pm_runtime_put_noidle(dev);
pm_runtime_disable(dev); pm_runtime_disable(dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册