summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorEtienne Carriere <etienne.carriere@st.com>2020-01-21 11:22:32 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-03-12 17:27:31 +0100
commit40ed9629935746bb3da1c3017e0f535fa93b610e (patch)
treef5658545481f4b31737c7565d2d34aef654e6de1 /drivers/media
parenta246b4d547708f33ff4d4b9a7a5dbac741dc89d8 (diff)
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: Etienne Carriere <etienne.carriere@st.com> Reviewed-by: Philippe Cornu <philippe.cornu@st.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/stm32/stm32-cec.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/platform/stm32/stm32-cec.c b/drivers/media/platform/stm32/stm32-cec.c
index 8a86b2cc22fa..86f19af5b917 100644
--- a/drivers/media/platform/stm32/stm32-cec.c
+++ b/drivers/media/platform/stm32/stm32-cec.c
@@ -302,10 +302,14 @@ static int stm32_cec_probe(struct platform_device *pdev)
}
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)) {
ret = clk_prepare(cec->clk_hdmi_cec);
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;
}
}