summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2014-12-09 12:05:43 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2014-12-17 11:02:42 +0100
commit698f8dc5333c782567cc1edcd8eb6828f196fed8 (patch)
tree5b671803ee051234be0c804286a2cc778cce4b95 /drivers
parent8f0493d43197f534c3bc6b6fd9f040680b32c88b (diff)
downloadbarebox-698f8dc5333c782567cc1edcd8eb6828f196fed8.tar.gz
barebox-698f8dc5333c782567cc1edcd8eb6828f196fed8.tar.xz
video: imx-hdmi: search for DDC node only when EDID support is enabled
This uses i2c functions that may not be available in every configuration and is only needed if EDID support is enabled, which in turn already selects I2C. Fixes: drivers/video/imx-ipu-v3/imx-hdmi.c: undefined reference to `of_find_i2c_adapter_by_node' Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/imx-ipu-v3/imx-hdmi.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/video/imx-ipu-v3/imx-hdmi.c b/drivers/video/imx-ipu-v3/imx-hdmi.c
index 4f462889a8..2da76a4b7a 100644
--- a/drivers/video/imx-ipu-v3/imx-hdmi.c
+++ b/drivers/video/imx-ipu-v3/imx-hdmi.c
@@ -1190,16 +1190,18 @@ static int imx_hdmi_probe(struct device_d *dev)
if (ret)
return ret;
- 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)
- dev_dbg(hdmi->dev, "failed to read ddc node\n");
- } else {
- dev_dbg(hdmi->dev, "no ddc property found\n");
- }
+ if (IS_ENABLED(CONFIG_DRIVER_VIDEO_EDID)) {
+ 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)
+ dev_dbg(hdmi->dev, "failed to read ddc node\n");
+ } else {
+ dev_dbg(hdmi->dev, "no ddc property found\n");
+ }
- ddc_node = NULL;
+ ddc_node = NULL;
+ }
hdmi->regs = dev_request_mem_region(dev, 0);
if (!hdmi->regs)