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>
This commit is contained in:
Simon Glass 2019-11-14 12:57:22 -07:00 committed by Tom Rini
parent 8d5babb45a
commit 2310c8ede3
2 changed files with 11 additions and 8 deletions

View File

@ -11,6 +11,7 @@
#include <config.h>
#include <circbuf.h>
#include <env.h>
#include <serial.h>
#include <stdio_dev.h>
#include <asm/unaligned.h>
#include "usbtty.h"

View File

@ -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 */