summaryrefslogtreecommitdiff
path: root/drivers/usb/serial/generic.c
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2021-05-05 12:19:20 +0300
committerJohan Hovold <johan@kernel.org>2021-05-19 11:56:41 +0300
commit155591d3ceeec2cd6a50b40278e2014c45f6b5f6 (patch)
tree4edf2ca8a9c98fd738273d8d42225e0a53ce5eee /drivers/usb/serial/generic.c
parent94cc7aeaf6c0cff0b8aeb7cb3579cee46b923560 (diff)
downloadlinux-155591d3ceeec2cd6a50b40278e2014c45f6b5f6.tar.xz
USB: serial: make usb_serial_driver::chars_in_buffer return uint
tty_operations::chars_in_buffer is being switched to return uint. Do the same for usb_serial_driver's chars_in_buffer. Signed-off-by: Jiri Slaby <jslaby@suse.cz> [ johan: amend commit message ] Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial/generic.c')
-rw-r--r--drivers/usb/serial/generic.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index bc3cf66af0de..15b6dee3a8e5 100644
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -247,11 +247,11 @@ unsigned int usb_serial_generic_write_room(struct tty_struct *tty)
return room;
}
-int usb_serial_generic_chars_in_buffer(struct tty_struct *tty)
+unsigned int usb_serial_generic_chars_in_buffer(struct tty_struct *tty)
{
struct usb_serial_port *port = tty->driver_data;
unsigned long flags;
- int chars;
+ unsigned int chars;
if (!port->bulk_out_size)
return 0;
@@ -260,7 +260,7 @@ int usb_serial_generic_chars_in_buffer(struct tty_struct *tty)
chars = kfifo_len(&port->write_fifo) + port->tx_bytes;
spin_unlock_irqrestore(&port->lock, flags);
- dev_dbg(&port->dev, "%s - returns %d\n", __func__, chars);
+ dev_dbg(&port->dev, "%s - returns %u\n", __func__, chars);
return chars;
}
EXPORT_SYMBOL_GPL(usb_serial_generic_chars_in_buffer);