提交 c2c38488 编写于 作者: A Andy Yan 提交者: Philipp Zabel

drm: imx: imx-hdmi: return defer if can't get ddc i2c adapter

drm driver may probe before the i2c bus, so the driver should
defer probing until it is available
Signed-off-by: NAndy Yan <andy.yan@rock-chips.com>
Reviewed-by: NDaniel Kurtz <djkurtz@chromium.org>
Tested-by: NRussell King <rmk+kernel@arm.linux.org.uk>
Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
上级 b5878339
......@@ -1611,10 +1611,12 @@ static int imx_hdmi_bind(struct device *dev, struct device *master, void *data)
ddc_node = of_parse_phandle(np, "ddc-i2c-bus", 0);
if (ddc_node) {
hdmi->ddc = of_find_i2c_adapter_by_node(ddc_node);
if (!hdmi->ddc)
of_node_put(ddc_node);
if (!hdmi->ddc) {
dev_dbg(hdmi->dev, "failed to read ddc node\n");
return -EPROBE_DEFER;
}
of_node_put(ddc_node);
} else {
dev_dbg(hdmi->dev, "no ddc property found\n");
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册