From: Simon Glass Date: Thu, 4 Sep 2014 22:27:23 +0000 (-0600) Subject: serial: Set up the 'priv' pointer when creating a serial device X-Git-Tag: v2014.10-rc3~115^2~11 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=addf9513d0b1a57062a8604330e8c0e822d9d214;p=u-boot 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 --- 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);