summaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-09-12 07:53:05 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-09-12 07:53:05 +0200
commit9b1102c02bfd39352e0d2995c733edb7be3b0601 (patch)
tree3f089c640bab75c020b69f5dcf44d744a0a7f2e4 /drivers/serial
parentf48a1596f4e911d4516b986e4778f18321b39b48 (diff)
parenta10dbfc4175867c0d15f02b7f244837c5d41478e (diff)
downloadbarebox-9b1102c02bfd39352e0d2995c733edb7be3b0601.tar.gz
Merge branch 'for-next/misc'
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/efi-stdio.c5
-rw-r--r--drivers/serial/serial_efi.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/drivers/serial/efi-stdio.c b/drivers/serial/efi-stdio.c
index 0703f72..2ca89fa 100644
--- a/drivers/serial/efi-stdio.c
+++ b/drivers/serial/efi-stdio.c
@@ -243,12 +243,13 @@ static int efi_process_key(struct efi_console_priv *priv, const char *inp)
return 1;
}
-static int efi_console_puts(struct console_device *cdev, const char *s)
+static int efi_console_puts(struct console_device *cdev, const char *s,
+ size_t nbytes)
{
struct efi_console_priv *priv = to_efi(cdev);
int n = 0;
- while (*s) {
+ while (nbytes--) {
if (*s == 27) {
priv->efi_console_buffer[n] = 0;
priv->out->output_string(priv->out,
diff --git a/drivers/serial/serial_efi.c b/drivers/serial/serial_efi.c
index f0a2b22..667d51f 100644
--- a/drivers/serial/serial_efi.c
+++ b/drivers/serial/serial_efi.c
@@ -130,13 +130,14 @@ static void efi_serial_putc(struct console_device *cdev, char c)
serial->write(serial, &buffersize, &c);
}
-static int efi_serial_puts(struct console_device *cdev, const char *s)
+static int efi_serial_puts(struct console_device *cdev, const char *s,
+ size_t nbytes)
{
struct efi_serial_port *uart = to_efi_serial_port(cdev);
struct efi_serial_io_protocol *serial = uart->serial;
uint32_t control;
efi_status_t efiret;
- unsigned long buffersize = strlen(s) * sizeof(char);
+ unsigned long buffersize = nbytes;
do {
efiret = serial->getcontrol(serial, &control);