]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
terminal: correct stdio_dev invocations
authorAsherah Connor <ashe@kivikakk.ee>
Wed, 10 Mar 2021 11:39:23 +0000 (22:39 +1100)
committerTom Rini <trini@konsulko.com>
Mon, 12 Apr 2021 21:44:55 +0000 (17:44 -0400)
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>
cmd/terminal.c

index f6e4d2539e358981f16888816e0dd9925d943910..733701e05961d39e299fce1c1a5a2b4f57d112bf 100644 (file)
@@ -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);
                }
        }