summaryrefslogtreecommitdiffstats
path: root/drivers/video/simple-panel.c
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2015-08-12 10:46:44 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-08-19 16:12:12 +0200
commitc5bfe48df02e678ecf03a174b43fccb477d5a100 (patch)
treed66abf4ceae7937febadfb5ff8b0f4fb286aea61 /drivers/video/simple-panel.c
parent6962badee7370aba8d9c60d7808c84798fcbc6d7 (diff)
downloadbarebox-c5bfe48df02e678ecf03a174b43fccb477d5a100.tar.gz
barebox-c5bfe48df02e678ecf03a174b43fccb477d5a100.tar.xz
video: simple-panel: mode support depends on I2C and EDID
Reading modes from EDID EEPROMs requires both I2C and EDID support to be available. As the simple panel driver is also useful without mode reading support, only built it in if the requirements are met. Fixes: In function `simple_panel_get_modes': simple-panel.c:88: undefined reference to `of_find_i2c_adapter_by_node' simple-panel.c:91: undefined reference to `edid_read_i2c' simple-panel.c:95: undefined reference to `edid_to_display_timings' Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/video/simple-panel.c')
-rw-r--r--drivers/video/simple-panel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/video/simple-panel.c b/drivers/video/simple-panel.c
index dceedc60c3..3dd760b385 100644
--- a/drivers/video/simple-panel.c
+++ b/drivers/video/simple-panel.c
@@ -82,7 +82,8 @@ static int simple_panel_get_modes(struct simple_panel *panel, struct display_tim
{
int ret = -ENOENT;
- if (panel->ddc_node) {
+ if (panel->ddc_node && IS_ENABLED(CONFIG_DRIVER_VIDEO_EDID) &&
+ IS_ENABLED(CONFIG_I2C)) {
struct i2c_adapter *i2c;
i2c = of_find_i2c_adapter_by_node(panel->ddc_node);