summaryrefslogtreecommitdiff
path: root/drivers/serial
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-09-04 16:27:23 -0600
committerSimon Glass <sjg@chromium.org>2014-09-10 12:59:59 -0600
commitaddf9513d0b1a57062a8604330e8c0e822d9d214 (patch)
treed8f7257d0beb9f00cd238c5dd82ab3101f173b5b /drivers/serial
parent2fccd2d96badcdf6165658a99771a4c475586279 (diff)
downloadu-boot-addf9513d0b1a57062a8604330e8c0e822d9d214.tar.gz
u-boot-addf9513d0b1a57062a8604330e8c0e822d9d214.tar.bz2
u-boot-addf9513d0b1a57062a8604330e8c0e822d9d214.zip
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 d2eb7520d0..bbe60af627 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);