diff options
author | Jiri Slaby <jslaby@suse.cz> | 2021-05-05 12:19:16 +0300 |
---|---|---|
committer | Johan Hovold <johan@kernel.org> | 2021-05-19 11:56:40 +0300 |
commit | 94cc7aeaf6c0cff0b8aeb7cb3579cee46b923560 (patch) | |
tree | 480c01d00d7ff2fd9bd25f7becd79625a8bd771b /drivers/usb/serial/generic.c | |
parent | d07f6ca923ea0927a1024dfccafc5b53b61cfecc (diff) | |
download | linux-94cc7aeaf6c0cff0b8aeb7cb3579cee46b923560.tar.xz |
USB: serial: make usb_serial_driver::write_room return uint
Line disciplines expect a positive value or zero returned from
tty->ops->write_room (invoked by tty_write_room). Both of them are being
updated to return an unsigned int. Switch also
usb_serial_driver::write_room and all its users.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
[ johan: amend commit message, drop unrelated comment change ]
Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial/generic.c')
-rw-r--r-- | drivers/usb/serial/generic.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index d10aa3d2ee49..bc3cf66af0de 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c @@ -230,11 +230,11 @@ int usb_serial_generic_write(struct tty_struct *tty, } EXPORT_SYMBOL_GPL(usb_serial_generic_write); -int usb_serial_generic_write_room(struct tty_struct *tty) +unsigned int usb_serial_generic_write_room(struct tty_struct *tty) { struct usb_serial_port *port = tty->driver_data; unsigned long flags; - int room; + unsigned int room; if (!port->bulk_out_size) return 0; @@ -243,7 +243,7 @@ int usb_serial_generic_write_room(struct tty_struct *tty) room = kfifo_avail(&port->write_fifo); spin_unlock_irqrestore(&port->lock, flags); - dev_dbg(&port->dev, "%s - returns %d\n", __func__, room); + dev_dbg(&port->dev, "%s - returns %u\n", __func__, room); return room; } |