Commit 43b05ce7 authored by Etienne Carriere's avatar Etienne Carriere Committed by Herbert Xu

crypto: stm32/hash - defer probe for reset controller

Change stm32 HASH driver to defer its probe operation when
reset controller device is registered but has not been probed yet.
Signed-off-by: default avatarEtienne Carriere <etienne.carriere@st.com>
Reviewed-by: default avatarLionel DEBIEVE <lionel.debieve@st.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 12b3cf90
...@@ -1482,7 +1482,12 @@ static int stm32_hash_probe(struct platform_device *pdev) ...@@ -1482,7 +1482,12 @@ static int stm32_hash_probe(struct platform_device *pdev)
pm_runtime_enable(dev); pm_runtime_enable(dev);
hdev->rst = devm_reset_control_get(&pdev->dev, NULL); hdev->rst = devm_reset_control_get(&pdev->dev, NULL);
if (!IS_ERR(hdev->rst)) { if (IS_ERR(hdev->rst)) {
if (PTR_ERR(hdev->rst) == -EPROBE_DEFER) {
ret = -EPROBE_DEFER;
goto err_reset;
}
} else {
reset_control_assert(hdev->rst); reset_control_assert(hdev->rst);
udelay(2); udelay(2);
reset_control_deassert(hdev->rst); reset_control_deassert(hdev->rst);
...@@ -1535,7 +1540,7 @@ static int stm32_hash_probe(struct platform_device *pdev) ...@@ -1535,7 +1540,7 @@ static int stm32_hash_probe(struct platform_device *pdev)
if (hdev->dma_lch) if (hdev->dma_lch)
dma_release_channel(hdev->dma_lch); dma_release_channel(hdev->dma_lch);
err_reset:
pm_runtime_disable(dev); pm_runtime_disable(dev);
pm_runtime_put_noidle(dev); pm_runtime_put_noidle(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment