diff mbox series

[1/2] terminal: correct stdio_dev invocations

Message ID 20210310113924.4632-2-ashe@kivikakk.ee
State Accepted
Commit 5c935eb6f7075b227178ddd3a3a231bef4b7238d
Delegated to: Tom Rini
Headers show
Series terminal: get this compiling again | expand

Commit Message

Asherah Connor March 10, 2021, 11:39 a.m. UTC
stdio_dev methods have taken a pointer to themselves since 709ea543
(nearly 7 years ago).

Signed-off-by: Asherah Connor <ashe@kivikakk.ee>
---

 cmd/terminal.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Simon Glass March 12, 2021, 4:45 a.m. UTC | #1
On Wed, 10 Mar 2021 at 04:39, Asherah Connor <ashe@kivikakk.ee> wrote:
>
> stdio_dev methods have taken a pointer to themselves since 709ea543
> (nearly 7 years ago).
>
> Signed-off-by: Asherah Connor <ashe@kivikakk.ee>
> ---
>
>  cmd/terminal.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini April 13, 2021, 2:28 p.m. UTC | #2
On Wed, Mar 10, 2021 at 10:39:23PM +1100, Asherah Connor wrote:

> stdio_dev methods have taken a pointer to themselves since 709ea543
> (nearly 7 years ago).
> 
> Signed-off-by: Asherah Connor <ashe@kivikakk.ee>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/cmd/terminal.c b/cmd/terminal.c
index f6e4d2539e..733701e059 100644
--- a/cmd/terminal.c
+++ b/cmd/terminal.c
@@ -33,8 +33,8 @@  int do_terminal(struct cmd_tbl *cmd, int flag, int argc, char *const argv[])
 		int c;
 
 		/* read from console and display on serial port */
-		if (stdio_devices[0]->tstc()) {
-			c = stdio_devices[0]->getc();
+		if (stdio_devices[0]->tstc(stdio_devices[0])) {
+			c = stdio_devices[0]->getc(stdio_devices[0]);
 			if (last_tilde == 1) {
 				if (c == '.') {
 					putc(c);
@@ -43,7 +43,7 @@  int do_terminal(struct cmd_tbl *cmd, int flag, int argc, char *const argv[])
 				} else {
 					last_tilde = 0;
 					/* write the delayed tilde */
-					dev->putc('~');
+					dev->putc(dev, '~');
 					/* fall-through to print current
 					 * character */
 				}
@@ -53,12 +53,12 @@  int do_terminal(struct cmd_tbl *cmd, int flag, int argc, char *const argv[])
 				puts("[u-boot]");
 				putc(c);
 			}
-			dev->putc(c);
+			dev->putc(dev, c);
 		}
 
 		/* read from serial port and display on console */
-		if (dev->tstc()) {
-			c = dev->getc();
+		if (dev->tstc(dev)) {
+			c = dev->getc(dev);
 			putc(c);
 		}
 	}