summaryrefslogtreecommitdiff
path: root/drivers/usb/serial/generic.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-06-24 12:54:28 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-06-24 12:54:28 +0200
commit8e9910c5ad97aa9479ab19e6535065522d6a0f08 (patch)
tree6137a99212febab66578bb4642a7f5d9bf1725f6 /drivers/usb/serial/generic.c
parent00a738b86ec0c88ad4745f658966f951cbe4c885 (diff)
parent8051334e901f2f7ab9fa30a15b74cdc8e58dfde2 (diff)
Merge tag 'usb-serial-5.14-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next
Johan writes: USB-serial updates for 5.14-rc1 Here are the USB-serial updates for 5.14-rc1, including: - gpio support for CP2108 - chars_in_buffer and write_room return-value updates - chars_in_buffer and write_room clean ups Included are also various clean ups. All have been in linux-next with no reported issues. * tag 'usb-serial-5.14-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: cp210x: add support for GPIOs on CP2108 USB: serial: drop irq-flags initialisations USB: serial: mos7840: drop buffer-callback return-value comments USB: serial: mos7720: drop buffer-callback sanity checks USB: serial: io_edgeport: drop buffer-callback sanity checks USB: serial: digi_acceleport: add chars_in_buffer locking USB: serial: digi_acceleport: reduce chars_in_buffer over-reporting USB: serial: make usb_serial_driver::chars_in_buffer return uint USB: serial: make usb_serial_driver::write_room return uint
Diffstat (limited to 'drivers/usb/serial/generic.c')
-rw-r--r--drivers/usb/serial/generic.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index d10aa3d2ee49..15b6dee3a8e5 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,15 +243,15 @@ 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;
}
-int usb_serial_generic_chars_in_buffer(struct tty_struct *tty)
+unsigned int usb_serial_generic_chars_in_buffer(struct tty_struct *tty)
{
struct usb_serial_port *port = tty->driver_data;
unsigned long flags;
- int chars;
+ unsigned int chars;
if (!port->bulk_out_size)
return 0;
@@ -260,7 +260,7 @@ int usb_serial_generic_chars_in_buffer(struct tty_struct *tty)
chars = kfifo_len(&port->write_fifo) + port->tx_bytes;
spin_unlock_irqrestore(&port->lock, flags);
- dev_dbg(&port->dev, "%s - returns %d\n", __func__, chars);
+ dev_dbg(&port->dev, "%s - returns %u\n", __func__, chars);
return chars;
}
EXPORT_SYMBOL_GPL(usb_serial_generic_chars_in_buffer);