Skip to content
Snippets Groups Projects
Commit addf9513 authored by Simon Glass's avatar Simon Glass
Browse files

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: default avatarSimon Glass <sjg@chromium.org>
parent 2fccd2d9
Branches
Tags
No related merge requests found
...@@ -320,6 +320,7 @@ void serial_stdio_init(void) ...@@ -320,6 +320,7 @@ void serial_stdio_init(void)
dev.puts = serial_stub_puts; dev.puts = serial_stub_puts;
dev.getc = serial_stub_getc; dev.getc = serial_stub_getc;
dev.tstc = serial_stub_tstc; dev.tstc = serial_stub_tstc;
dev.priv = s;
stdio_register(&dev); stdio_register(&dev);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment