summaryrefslogtreecommitdiff
path: root/drivers/usb/serial/io_edgeport.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/io_edgeport.c
parentd07f6ca923ea0927a1024dfccafc5b53b61cfecc (diff)
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/io_edgeport.c')
-rw-r--r--drivers/usb/serial/io_edgeport.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c
index e6fe3882bf69..f6cedc87d3e4 100644
--- a/drivers/usb/serial/io_edgeport.c
+++ b/drivers/usb/serial/io_edgeport.c
@@ -1355,11 +1355,11 @@ exit_send:
* we return the amount of room that we have for this port (the txCredits)
* otherwise we return a negative error number.
*****************************************************************************/
-static int edge_write_room(struct tty_struct *tty)
+static unsigned int edge_write_room(struct tty_struct *tty)
{
struct usb_serial_port *port = tty->driver_data;
struct edgeport_port *edge_port = usb_get_serial_port_data(port);
- int room;
+ unsigned int room;
unsigned long flags;
if (edge_port == NULL)
@@ -1377,7 +1377,7 @@ static int edge_write_room(struct tty_struct *tty)
room = edge_port->txCredits - edge_port->txfifo.count;
spin_unlock_irqrestore(&edge_port->ep_lock, flags);
- dev_dbg(&port->dev, "%s - returns %d\n", __func__, room);
+ dev_dbg(&port->dev, "%s - returns %u\n", __func__, room);
return room;
}