aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/serial/mos7840.c
diff options
context:
space:
mode:
authorJiri Slaby2021-05-05 11:19:20 +0200
committerJohan Hovold2021-05-19 10:56:41 +0200
commit155591d3ceeec2cd6a50b40278e2014c45f6b5f6 (patch)
tree4edf2ca8a9c98fd738273d8d42225e0a53ce5eee /drivers/usb/serial/mos7840.c
parent94cc7aeaf6c0cff0b8aeb7cb3579cee46b923560 (diff)
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/mos7840.c')
-rw-r--r--drivers/usb/serial/mos7840.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index 609799aaba72..b22ccbd98998 100644
--- a/drivers/usb/serial/mos7840.c
+++ b/drivers/usb/serial/mos7840.c
@@ -735,12 +735,12 @@ err:
* Otherwise we return zero.
*****************************************************************************/
-static int mos7840_chars_in_buffer(struct tty_struct *tty)
+static unsigned int mos7840_chars_in_buffer(struct tty_struct *tty)
{
struct usb_serial_port *port = tty->driver_data;
struct moschip_port *mos7840_port = usb_get_serial_port_data(port);
int i;
- int chars = 0;
+ unsigned int chars = 0;
unsigned long flags;
spin_lock_irqsave(&mos7840_port->pool_lock, flags);
@@ -751,7 +751,7 @@ static int mos7840_chars_in_buffer(struct tty_struct *tty)
}
}
spin_unlock_irqrestore(&mos7840_port->pool_lock, flags);
- dev_dbg(&port->dev, "%s - returns %d\n", __func__, chars);
+ dev_dbg(&port->dev, "%s - returns %u\n", __func__, chars);
return chars;
}