[U-Boot] [PATCH v5 01/14] serial: Set up the 'priv' pointer when creating a serial device

Simon Glass sjg at chromium.org
Fri Sep 5 00:27:23 CEST 2014


The stdio_dev structure has a private pointer for its creator, but it is
not set up by the serial system. Set it to point to the serial device so
that it can be found by code called by stdio.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

Changes in v5: None
Changes in v4: None
Changes in v3:
- Fix typo in commit message

Changes in v2: None

 drivers/serial/serial.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index d2eb752..bbe60af 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -320,6 +320,7 @@ void serial_stdio_init(void)
 		dev.puts = serial_stub_puts;
 		dev.getc = serial_stub_getc;
 		dev.tstc = serial_stub_tstc;
+		dev.priv = s;
 
 		stdio_register(&dev);
 
-- 
2.1.0.rc2.206.gedb03e5



More information about the U-Boot mailing list