mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 2/5] video: imx-hdmi: search for DDC node only when EDID support is enabled
Date: Tue,  9 Dec 2014 12:05:43 +0100	[thread overview]
Message-ID: <1418123146-13235-2-git-send-email-l.stach@pengutronix.de> (raw)
In-Reply-To: <1418123146-13235-1-git-send-email-l.stach@pengutronix.de>

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>
---
 drivers/video/imx-ipu-v3/imx-hdmi.c | 20 +++++++++++---------
 1 file 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 4f462889a873..2da76a4b7a74 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)
-- 
2.1.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2014-12-09 11:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-09 11:05 [PATCH 1/5] usb: gadget: fastboot: allow to build without BOOTM Lucas Stach
2014-12-09 11:05 ` Lucas Stach [this message]
2014-12-09 11:05 ` [PATCH 3/5] imd: provide dummy imd_command_setenv Lucas Stach
2014-12-10  9:05   ` Lucas Stach
2014-12-09 11:05 ` [PATCH 4/5] fdt: don't strip const qualifier Lucas Stach
2014-12-11  7:37   ` Sascha Hauer
2014-12-09 11:05 ` [PATCH 5/5] Revert "ARM: i.MX: Make NAND related Kconfig options depend on MTD" Lucas Stach
2014-12-11  7:36 ` [PATCH 1/5] usb: gadget: fastboot: allow to build without BOOTM Sascha Hauer
2014-12-15 11:35   ` Lucas Stach
2014-12-17 10:03     ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1418123146-13235-2-git-send-email-l.stach@pengutronix.de \
    --to=l.stach@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox