public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 14/42] serial: usb: Correct the usbtty_...() prototypes
Date: Thu, 14 Nov 2019 12:57:22 -0700	[thread overview]
Message-ID: <20191114195751.30357-3-sjg@chromium.org> (raw)
In-Reply-To: <20191114195751.30357-1-sjg@chromium.org>

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>
---

Changes in v4: None
Changes in v3: None
Changes in v2: None

 drivers/serial/usbtty.c |  1 +
 include/serial.h        | 18 ++++++++++--------
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/drivers/serial/usbtty.c b/drivers/serial/usbtty.c
index 76d9c8a3a6..f1c1a260da 100644
--- a/drivers/serial/usbtty.c
+++ b/drivers/serial/usbtty.c
@@ -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"
diff --git a/include/serial.h b/include/serial.h
index c1368c68b6..38a1cc99ae 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 */
 
-- 
2.24.0.rc1.363.gb1bccd3e3d-goog

  parent reply	other threads:[~2019-11-14 19:57 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-14 19:57 [U-Boot] [PATCH v4 00/42] common: Further reduce common.h Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 01/42] common: Move older CPU functions to their own header Simon Glass
2019-11-20  0:45   ` Tom Rini
2019-11-14 19:57 ` [U-Boot] [PATCH v4 02/42] Drop CONFIG_SHOW_ACTIVITY Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 03/42] common: Drop global inclusion of status_led.h Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 04/42] status_led: Tidy up the code style Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 05/42] common: Move random-number functions into their own header Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 06/42] common: Drop linux/crc8.h Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 07/42] crc: Fix code style with crc functions Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 08/42] crc32: Use the crc.h header for " Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 09/42] spl: bootcount: Move code out of header file Simon Glass
2019-11-20  0:46   ` Tom Rini
2019-11-14 19:57 ` [U-Boot] [PATCH v4 10/42] common: Move bootcount functions to their " Simon Glass
2019-11-20  0:45   ` Tom Rini
2019-11-14 19:57 ` [U-Boot] [PATCH v4 11/42] common: Move sorting functions to their own " Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 12/42] Move strtomhz() to vsprintf.h Simon Glass
2019-11-20  0:45   ` Tom Rini
2019-11-14 19:57 ` [U-Boot] [PATCH v4 13/42] common: Move env_get_ip() to net.h Simon Glass
2019-11-18 21:27   ` Joe Hershberger
2019-11-14 19:57 ` Simon Glass [this message]
2019-11-14 19:57 ` [U-Boot] [PATCH v4 15/42] common: Move serial_printf() to the serial header Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 16/42] common: Move serial functions out of common.h Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 17/42] common: Add a new lz4.h header file Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 18/42] common: Move some time functions out of common.h Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 19/42] common: Move wait_ticks " Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 20/42] arm: pxa: Drop pxa_wait_ticks() Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 21/42] common: Move timer_get_us() function out of common.h Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 22/42] common: Move get_ticks() " Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 23/42] common: Move mii_init() " Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 24/42] common: Move some CPU functions " Simon Glass
2019-11-20  0:45   ` Tom Rini
2019-11-14 19:57 ` [U-Boot] [PATCH v4 25/42] common: Drop cpu_init() Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 26/42] common: Move checkcpu() out of common.h Simon Glass
2019-11-20  0:46   ` Tom Rini
2019-11-14 19:57 ` [U-Boot] [PATCH v4 27/42] common: Move some SMP functions " Simon Glass
2019-11-20  0:46   ` Tom Rini
2019-11-14 19:57 ` [U-Boot] [PATCH v4 28/42] arm: powerpc: Tidy up code style for cache functions Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 29/42] common: Move some cache and MMU functions out of common.h Simon Glass
2019-11-20  0:46   ` Tom Rini
2019-11-14 19:57 ` [U-Boot] [PATCH v4 30/42] common: Drop checkicache() and checkdcache() Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 31/42] common: Move ARM cache operations out of common.h Simon Glass
2019-11-15 12:46   ` Daniel Schwierzeck
2019-11-15 16:46     ` Simon Glass
2019-11-20  0:46   ` Tom Rini
2019-11-14 19:57 ` [U-Boot] [PATCH v4 32/42] arm: powerpc: Tidy up code style for interrupt functions Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 33/42] common: Move interrupt functions into a new header Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 34/42] common: Move enable/disable_interrupts out of common.h Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 35/42] common: Move command functions " Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 36/42] common: Drop board_show_dram() Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 37/42] common: Move board_get_usable_ram_top() out of common.h Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 38/42] common: Move some board functions " Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 39/42] common: Move pci_init_board() " Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 40/42] common: Move trap_init() " Simon Glass
2019-11-15 13:07   ` Daniel Schwierzeck
2019-11-14 19:57 ` [U-Boot] [PATCH v4 41/42] common: Drop get_endaddr() Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 42/42] common: Move old EEPROM functions into a new header Simon Glass
2019-11-21 22:23 ` [U-Boot] [PATCH v4 00/42] common: Further reduce common.h Simon Glass
2019-11-21 23:03   ` Tom Rini
2019-11-22  0:21     ` Simon Glass
2019-12-03  3:10 ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191114195751.30357-3-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox