diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-06-24 12:54:28 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-06-24 12:54:28 +0200 |
commit | 8e9910c5ad97aa9479ab19e6535065522d6a0f08 (patch) | |
tree | 6137a99212febab66578bb4642a7f5d9bf1725f6 /drivers/usb/serial/sierra.c | |
parent | 00a738b86ec0c88ad4745f658966f951cbe4c885 (diff) | |
parent | 8051334e901f2f7ab9fa30a15b74cdc8e58dfde2 (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/sierra.c')
-rw-r--r-- | drivers/usb/serial/sierra.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index 54e16ffc30a0..4b49b7c33364 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c @@ -613,7 +613,7 @@ static void sierra_instat_callback(struct urb *urb) } } -static int sierra_write_room(struct tty_struct *tty) +static unsigned int sierra_write_room(struct tty_struct *tty) { struct usb_serial_port *port = tty->driver_data; struct sierra_port_private *portdata = usb_get_serial_port_data(port); @@ -632,19 +632,19 @@ static int sierra_write_room(struct tty_struct *tty) return 2048; } -static int sierra_chars_in_buffer(struct tty_struct *tty) +static unsigned int sierra_chars_in_buffer(struct tty_struct *tty) { struct usb_serial_port *port = tty->driver_data; struct sierra_port_private *portdata = usb_get_serial_port_data(port); unsigned long flags; - int chars; + unsigned int chars; /* NOTE: This overcounts somewhat. */ spin_lock_irqsave(&portdata->lock, flags); chars = portdata->outstanding_urbs * MAX_TRANSFER; spin_unlock_irqrestore(&portdata->lock, flags); - dev_dbg(&port->dev, "%s - %d\n", __func__, chars); + dev_dbg(&port->dev, "%s - %u\n", __func__, chars); return chars; } |