summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/mos7720.c
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2021-05-05 11:19:16 +0200
committerJohan Hovold <johan@kernel.org>2021-05-19 10:56:40 +0200
commit94cc7aeaf6c0cff0b8aeb7cb3579cee46b923560 (patch)
tree480c01d00d7ff2fd9bd25f7becd79625a8bd771b /drivers/usb/serial/mos7720.c
parentLinux 5.13-rc2 (diff)
downloadlinux-94cc7aeaf6c0cff0b8aeb7cb3579cee46b923560.tar.xz
linux-94cc7aeaf6c0cff0b8aeb7cb3579cee46b923560.zip
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/mos7720.c')
-rw-r--r--drivers/usb/serial/mos7720.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c
index 6ee83886e2c9..d9cc7f840d48 100644
--- a/drivers/usb/serial/mos7720.c
+++ b/drivers/usb/serial/mos7720.c
@@ -1033,11 +1033,11 @@ static void mos7720_break(struct tty_struct *tty, int break_state)
* If successful, we return the amount of room that we have for this port
* Otherwise we return a negative error number.
*/
-static int mos7720_write_room(struct tty_struct *tty)
+static unsigned int mos7720_write_room(struct tty_struct *tty)
{
struct usb_serial_port *port = tty->driver_data;
struct moschip_port *mos7720_port;
- int room = 0;
+ unsigned int room = 0;
int i;
mos7720_port = usb_get_serial_port_data(port);
@@ -1051,7 +1051,7 @@ static int mos7720_write_room(struct tty_struct *tty)
room += URB_TRANSFER_BUFFER_SIZE;
}
- dev_dbg(&port->dev, "%s - returns %d\n", __func__, room);
+ dev_dbg(&port->dev, "%s - returns %u\n", __func__, room);
return room;
}