diff options
Diffstat (limited to 'drivers/tty/hvc')
-rw-r--r-- | drivers/tty/hvc/hvc_console.c | 2 | ||||
-rw-r--r-- | drivers/tty/hvc/hvcs.c | 5 | ||||
-rw-r--r-- | drivers/tty/hvc/hvsi.c | 3 |
3 files changed, 6 insertions, 4 deletions
diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c index 4c60d15c7a6f..e93e8072ec86 100644 --- a/drivers/tty/hvc/hvc_console.c +++ b/drivers/tty/hvc/hvc_console.c @@ -496,7 +496,7 @@ static int hvc_push(struct hvc_struct *hp) return n; } -static int hvc_write(struct tty_struct *tty, const u8 *buf, int count) +static ssize_t hvc_write(struct tty_struct *tty, const u8 *buf, size_t count) { struct hvc_struct *hp = tty->driver_data; unsigned long flags; diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c index 2465d61b4e76..1de91fa23b04 100644 --- a/drivers/tty/hvc/hvcs.c +++ b/drivers/tty/hvc/hvcs.c @@ -1257,7 +1257,7 @@ static void hvcs_hangup(struct tty_struct * tty) * tty_hangup will allow hvcs_write time to complete execution before it * terminates our device. */ -static int hvcs_write(struct tty_struct *tty, const u8 *buf, int count) +static ssize_t hvcs_write(struct tty_struct *tty, const u8 *buf, size_t count) { struct hvcs_struct *hvcsd = tty->driver_data; unsigned int unit_address; @@ -1299,7 +1299,8 @@ static int hvcs_write(struct tty_struct *tty, const u8 *buf, int count) unit_address = hvcsd->vdev->unit_address; while (count > 0) { - tosend = min(count, (HVCS_BUFF_LEN - hvcsd->chars_in_buffer)); + tosend = min_t(unsigned, count, + (HVCS_BUFF_LEN - hvcsd->chars_in_buffer)); /* * No more space, this probably means that the last call to * hvcs_write() didn't succeed and the buffer was filled up. diff --git a/drivers/tty/hvc/hvsi.c b/drivers/tty/hvc/hvsi.c index 46dd62df2442..c57bd85aa488 100644 --- a/drivers/tty/hvc/hvsi.c +++ b/drivers/tty/hvc/hvsi.c @@ -904,7 +904,8 @@ static unsigned int hvsi_chars_in_buffer(struct tty_struct *tty) return hp->n_outbuf; } -static int hvsi_write(struct tty_struct *tty, const u8 *source, int count) +static ssize_t hvsi_write(struct tty_struct *tty, const u8 *source, + size_t count) { struct hvsi_struct *hp = tty->driver_data; unsigned long flags; |