[PATCH 5/9] video: stm: read interface width from device tree

Sascha Hauer s.hauer at pengutronix.de
Mon Jul 6 03:36:10 PDT 2015


The interface width has not been initialized when probed from device
tree. Fix that.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/video/stm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/video/stm.c b/drivers/video/stm.c
index c825092..dd80a98 100644
--- a/drivers/video/stm.c
+++ b/drivers/video/stm.c
@@ -553,6 +553,12 @@ static int stmfb_probe(struct device_d *hw_dev)
 
 		fbi.info.modes.modes = modes->modes;
 		fbi.info.modes.num_modes = modes->num_modes;
+
+		ret = of_property_read_u32(display, "bus-width", &fbi.ld_intf_width);
+		if (ret < 0) {
+			dev_err(hw_dev, "failed to get bus-width property\n");
+			return -EINVAL;
+		}
 	}
 
 	ret = register_framebuffer(&fbi.info);
-- 
2.1.4




More information about the barebox mailing list