aboutsummaryrefslogtreecommitdiff
path: root/include/serial.h
diff options
context:
space:
mode:
authorSimon Glass2019-11-14 12:57:22 -0700
committerTom Rini2019-12-02 18:23:10 -0500
commit2310c8ede3341757ca78885c25262a30e520a3ff (patch)
tree1d74124e87bf3fc7e2c16b309c98b27be204ee76 /include/serial.h
parent8d5babb45a051efb9ce4c9e06a693d72ee6cba5a (diff)
serial: usb: Correct the usbtty_...() prototypes
The function declarations in serial.h are not in sync with what is currently used in usbtty. Fix this by updating the header and including it, to help catch future such problems. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include/serial.h')
-rw-r--r--include/serial.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/include/serial.h b/include/serial.h
index c1368c68b64..38a1cc99ae2 100644
--- a/include/serial.h
+++ b/include/serial.h
@@ -50,18 +50,20 @@ extern void serial_reinit_all(void);
/* For usbtty */
#ifdef CONFIG_USB_TTY
-extern int usbtty_getc(void);
-extern void usbtty_putc(const char c);
-extern void usbtty_puts(const char *str);
-extern int usbtty_tstc(void);
+struct stdio_dev;
+
+int usbtty_getc(struct stdio_dev *dev);
+void usbtty_putc(struct stdio_dev *dev, const char c);
+void usbtty_puts(struct stdio_dev *dev, const char *str);
+int usbtty_tstc(struct stdio_dev *dev);
#else
/* stubs */
-#define usbtty_getc() 0
-#define usbtty_putc(a)
-#define usbtty_puts(a)
-#define usbtty_tstc() 0
+#define usbtty_getc(dev) 0
+#define usbtty_putc(dev, a)
+#define usbtty_puts(dev, a)
+#define usbtty_tstc(dev) 0
#endif /* CONFIG_USB_TTY */