]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
serial: Set up the 'priv' pointer when creating a serial device
authorSimon Glass <sjg@chromium.org>
Thu, 4 Sep 2014 22:27:23 +0000 (16:27 -0600)
committerSimon Glass <sjg@chromium.org>
Wed, 10 Sep 2014 18:59:59 +0000 (12:59 -0600)
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>
drivers/serial/serial.c

index d2eb7520d03886748c7d0130a0851c51eca8d997..bbe60af627e4c452eb7a76fb6c7552819439dcff 100644 (file)
@@ -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);