summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/sierra.c
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2021-05-05 11:19:20 +0200
committerJohan Hovold <johan@kernel.org>2021-05-19 10:56:41 +0200
commit155591d3ceeec2cd6a50b40278e2014c45f6b5f6 (patch)
tree4edf2ca8a9c98fd738273d8d42225e0a53ce5eee /drivers/usb/serial/sierra.c
parentUSB: serial: make usb_serial_driver::write_room return uint (diff)
downloadlinux-155591d3ceeec2cd6a50b40278e2014c45f6b5f6.tar.xz
linux-155591d3ceeec2cd6a50b40278e2014c45f6b5f6.zip
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/sierra.c')
-rw-r--r--drivers/usb/serial/sierra.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index 753cee5d17a1..4b49b7c33364 100644
--- a/drivers/usb/serial/sierra.c
+++ b/drivers/usb/serial/sierra.c
@@ -632,19 +632,19 @@ static unsigned int sierra_write_room(struct tty_struct *tty)
return 2048;
}
-static int sierra_chars_in_buffer(struct tty_struct *tty)
+static unsigned int sierra_chars_in_buffer(struct tty_struct *tty)
{
struct usb_serial_port *port = tty->driver_data;
struct sierra_port_private *portdata = usb_get_serial_port_data(port);
unsigned long flags;
- int chars;
+ unsigned int chars;
/* NOTE: This overcounts somewhat. */
spin_lock_irqsave(&portdata->lock, flags);
chars = portdata->outstanding_urbs * MAX_TRANSFER;
spin_unlock_irqrestore(&portdata->lock, flags);
- dev_dbg(&port->dev, "%s - %d\n", __func__, chars);
+ dev_dbg(&port->dev, "%s - %u\n", __func__, chars);
return chars;
}