summaryrefslogtreecommitdiff
path: root/drivers/tty/moxa.c
diff options
context:
space:
mode:
authorJiri Slaby (SUSE) <jirislaby@kernel.org>2023-08-10 11:15:03 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-08-11 21:12:46 +0200
commit95713967ba52389f7cea75704d0cf048080ec218 (patch)
treefec0df386db066c0026c8eb2e7fef035903e9af0 /drivers/tty/moxa.c
parentdcaafbe6ee3b39f2df11a1352f85172f8ade17a5 (diff)
tty: make tty_operations::write()'s count size_t
Unify with the rest of the code. Use size_t for counts and ssize_t for retval. Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20230810091510.13006-30-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/moxa.c')
-rw-r--r--drivers/tty/moxa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c
index d94cf1be651b..bf3f87ba3a92 100644
--- a/drivers/tty/moxa.c
+++ b/drivers/tty/moxa.c
@@ -487,7 +487,7 @@ module_param(ttymajor, int, 0);
*/
static int moxa_open(struct tty_struct *, struct file *);
static void moxa_close(struct tty_struct *, struct file *);
-static int moxa_write(struct tty_struct *, const u8 *, int);
+static ssize_t moxa_write(struct tty_struct *, const u8 *, size_t);
static unsigned int moxa_write_room(struct tty_struct *);
static void moxa_flush_buffer(struct tty_struct *);
static unsigned int moxa_chars_in_buffer(struct tty_struct *);
@@ -1499,7 +1499,7 @@ static void moxa_close(struct tty_struct *tty, struct file *filp)
tty_port_close(&ch->port, tty, filp);
}
-static int moxa_write(struct tty_struct *tty, const u8 *buf, int count)
+static ssize_t moxa_write(struct tty_struct *tty, const u8 *buf, size_t count)
{
struct moxa_port *ch = tty->driver_data;
unsigned long flags;