diff options
| -rw-r--r-- | drivers/tty/serial/earlycon-riscv-sbi.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/tty/serial/earlycon-riscv-sbi.c b/drivers/tty/serial/earlycon-riscv-sbi.c index e1a551aae336..ce81523c3113 100644 --- a/drivers/tty/serial/earlycon-riscv-sbi.c +++ b/drivers/tty/serial/earlycon-riscv-sbi.c | |||
| @@ -10,13 +10,16 @@ | |||
| 10 | #include <linux/serial_core.h> | 10 | #include <linux/serial_core.h> |
| 11 | #include <asm/sbi.h> | 11 | #include <asm/sbi.h> |
| 12 | 12 | ||
| 13 | static void sbi_console_write(struct console *con, | 13 | static void sbi_putc(struct uart_port *port, int c) |
| 14 | const char *s, unsigned int n) | ||
| 15 | { | 14 | { |
| 16 | int i; | 15 | sbi_console_putchar(c); |
| 16 | } | ||
| 17 | 17 | ||
| 18 | for (i = 0; i < n; ++i) | 18 | static void sbi_console_write(struct console *con, |
| 19 | sbi_console_putchar(s[i]); | 19 | const char *s, unsigned n) |
| 20 | { | ||
| 21 | struct earlycon_device *dev = con->data; | ||
| 22 | uart_console_write(&dev->port, s, n, sbi_putc); | ||
| 20 | } | 23 | } |
| 21 | 24 | ||
| 22 | static int __init early_sbi_setup(struct earlycon_device *device, | 25 | static int __init early_sbi_setup(struct earlycon_device *device, |
