summaryrefslogtreecommitdiff
path: root/drivers/serial
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-09-04 22:27:23 (GMT)
committerSimon Glass <sjg@chromium.org>2014-09-10 18:59:59 (GMT)
commitaddf9513d0b1a57062a8604330e8c0e822d9d214 (patch)
treed8f7257d0beb9f00cd238c5dd82ab3101f173b5b /drivers/serial
parent2fccd2d96badcdf6165658a99771a4c475586279 (diff)
downloadu-boot-addf9513d0b1a57062a8604330e8c0e822d9d214.tar.xz
serial: Set up the 'priv' pointer when creating a serial device
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@chromium.org>
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/serial.c1
1 files changed, 1 insertions, 0 deletions
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);