diff options
author | Jiri Slaby <jslaby@suse.cz> | 2021-05-05 12:19:20 +0300 |
---|---|---|
committer | Johan Hovold <johan@kernel.org> | 2021-05-19 11:56:41 +0300 |
commit | 155591d3ceeec2cd6a50b40278e2014c45f6b5f6 (patch) | |
tree | 4edf2ca8a9c98fd738273d8d42225e0a53ce5eee /drivers/usb/serial/cypress_m8.c | |
parent | 94cc7aeaf6c0cff0b8aeb7cb3579cee46b923560 (diff) | |
download | linux-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/cypress_m8.c')
-rw-r--r-- | drivers/usb/serial/cypress_m8.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index 5e7d2f9fa0c2..1dca04e1519d 100644 --- a/drivers/usb/serial/cypress_m8.c +++ b/drivers/usb/serial/cypress_m8.c @@ -129,7 +129,7 @@ static void cypress_set_termios(struct tty_struct *tty, static int cypress_tiocmget(struct tty_struct *tty); static int cypress_tiocmset(struct tty_struct *tty, unsigned int set, unsigned int clear); -static int cypress_chars_in_buffer(struct tty_struct *tty); +static unsigned int cypress_chars_in_buffer(struct tty_struct *tty); static void cypress_throttle(struct tty_struct *tty); static void cypress_unthrottle(struct tty_struct *tty); static void cypress_set_dead(struct usb_serial_port *port); @@ -970,18 +970,18 @@ static void cypress_set_termios(struct tty_struct *tty, /* returns amount of data still left in soft buffer */ -static int cypress_chars_in_buffer(struct tty_struct *tty) +static unsigned int cypress_chars_in_buffer(struct tty_struct *tty) { struct usb_serial_port *port = tty->driver_data; struct cypress_private *priv = usb_get_serial_port_data(port); - int chars = 0; + unsigned int chars; unsigned long flags; spin_lock_irqsave(&priv->lock, flags); chars = kfifo_len(&priv->write_fifo); spin_unlock_irqrestore(&priv->lock, flags); - dev_dbg(&port->dev, "%s - returns %d\n", __func__, chars); + dev_dbg(&port->dev, "%s - returns %u\n", __func__, chars); return chars; } |