Commit 40ed9629 authored by Etienne Carriere's avatar Etienne Carriere Committed by Mauro Carvalho Chehab

media: platform: stm32: defer probe for auxiliary clock

Change stm32-cec driver to defer probe when auxiliary clock
"hdmi-cec" is registered in the system not has not been probed yet.
Signed-off-by: default avatarEtienne Carriere <etienne.carriere@st.com>
Reviewed-by: default avatarPhilippe Cornu <philippe.cornu@st.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent a246b4d5
...@@ -302,10 +302,14 @@ static int stm32_cec_probe(struct platform_device *pdev) ...@@ -302,10 +302,14 @@ static int stm32_cec_probe(struct platform_device *pdev)
} }
cec->clk_hdmi_cec = devm_clk_get(&pdev->dev, "hdmi-cec"); cec->clk_hdmi_cec = devm_clk_get(&pdev->dev, "hdmi-cec");
if (IS_ERR(cec->clk_hdmi_cec) &&
PTR_ERR(cec->clk_hdmi_cec) == -EPROBE_DEFER)
return -EPROBE_DEFER;
if (!IS_ERR(cec->clk_hdmi_cec)) { if (!IS_ERR(cec->clk_hdmi_cec)) {
ret = clk_prepare(cec->clk_hdmi_cec); ret = clk_prepare(cec->clk_hdmi_cec);
if (ret) { if (ret) {
dev_err(&pdev->dev, "Unable to prepare hdmi-cec clock\n"); dev_err(&pdev->dev, "Can't prepare hdmi-cec clock\n");
return ret; return ret;
} }
} }
......
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