[PATCH 3/4] video: simple-panel: mode support depends on I2C and EDID

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 drivers/video/simple-panel.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/video/simple-panel.c b/drivers/video/simple-panel.c
index dceedc60c31d..3dd760b38538 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);
-- 
2.4.6


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



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux