mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
USB-serial updates for 5.20-rc1
Here are the USB-serial updates for 5.20-rc1, including - a fix up of some tty-port initialized comments that had got truncated and obfuscated Included are also various clean ups. All but the final commit have been in linux-next and with no reported issues. -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQHbPq+cpGvN/peuzMLxc3C7H1lCAUCYt5e7QAKCRALxc3C7H1l CFcWAP4hjc2GHm3VuQNISc31CP2NeLW/DVMIlhc2xOEF0bRTPwEAnYtuPajGjbPL ED42eNCA7vcLG3Q8HaxTI9cEjujacQw= =1/u0 -----END PGP SIGNATURE----- Merge tag 'usb-serial-5.20-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for 5.20-rc1 Here are the USB-serial updates for 5.20-rc1, including - a fix up of some tty-port initialized comments that had got truncated and obfuscated Included are also various clean ups. All but the final commit have been in linux-next and with no reported issues. * tag 'usb-serial-5.20-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: fix tty-port initialized comments USB: serial: fix repeated word "the" in comments USB: serial: io_edgeport: fix spelling mistakes USB: serial: use kmemdup instead of kmalloc + memcpy
This commit is contained in:
commit
b6de1f9010
@ -256,7 +256,7 @@ static int analyze_baud_rate(struct usb_serial_port *port, speed_t new_rate)
|
||||
/*
|
||||
* Mike Isely <isely@pobox.com> 2-Feb-2008: The
|
||||
* Cypress app note that describes this mechanism
|
||||
* states the the low-speed part can't handle more
|
||||
* states that the low-speed part can't handle more
|
||||
* than 800 bytes/sec, in which case 4800 baud is the
|
||||
* safest speed for a part like that.
|
||||
*/
|
||||
|
@ -988,7 +988,7 @@ static int garmin_write_bulk(struct usb_serial_port *port,
|
||||
garmin_data_p->flags &= ~FLAGS_DROP_DATA;
|
||||
spin_unlock_irqrestore(&garmin_data_p->lock, flags);
|
||||
|
||||
buffer = kmalloc(count, GFP_ATOMIC);
|
||||
buffer = kmemdup(buf, count, GFP_ATOMIC);
|
||||
if (!buffer)
|
||||
return -ENOMEM;
|
||||
|
||||
@ -998,8 +998,6 @@ static int garmin_write_bulk(struct usb_serial_port *port,
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
memcpy(buffer, buf, count);
|
||||
|
||||
usb_serial_debug_data(&port->dev, __func__, count, buffer);
|
||||
|
||||
usb_fill_bulk_urb(urb, serial->dev,
|
||||
|
@ -220,7 +220,7 @@ struct edgeport_serial {
|
||||
__u8 rxHeader3; /* receive header byte 3 */
|
||||
__u8 rxPort; /* the port that we are currently receiving data for */
|
||||
__u8 rxStatusCode; /* the receive status code */
|
||||
__u8 rxStatusParam; /* the receive status paramater */
|
||||
__u8 rxStatusParam; /* the receive status parameter */
|
||||
__s16 rxBytesRemaining; /* the number of port bytes left to read */
|
||||
struct usb_serial *serial; /* loop back to the owner of this object */
|
||||
};
|
||||
@ -901,7 +901,7 @@ static int edge_open(struct tty_struct *tty, struct usb_serial_port *port)
|
||||
|
||||
if (!edge_port->open) {
|
||||
/* open timed out */
|
||||
dev_dbg(dev, "%s - open timedout\n", __func__);
|
||||
dev_dbg(dev, "%s - open timeout\n", __func__);
|
||||
edge_port->openPending = false;
|
||||
return -ENODEV;
|
||||
}
|
||||
|
@ -826,7 +826,7 @@ static int mos77xx_calc_num_ports(struct usb_serial *serial,
|
||||
/*
|
||||
* The 7715 uses the first bulk in/out endpoint pair for the
|
||||
* parallel port, and the second for the serial port. We swap
|
||||
* the endpoint descriptors here so that the the first and
|
||||
* the endpoint descriptors here so that the first and
|
||||
* only registered port structure uses the serial-port
|
||||
* endpoints.
|
||||
*/
|
||||
|
@ -208,7 +208,7 @@ static int opticon_write(struct tty_struct *tty, struct usb_serial_port *port,
|
||||
priv->outstanding_bytes += count;
|
||||
spin_unlock_irqrestore(&priv->lock, flags);
|
||||
|
||||
buffer = kmalloc(count, GFP_ATOMIC);
|
||||
buffer = kmemdup(buf, count, GFP_ATOMIC);
|
||||
if (!buffer)
|
||||
goto error_no_buffer;
|
||||
|
||||
@ -216,8 +216,6 @@ static int opticon_write(struct tty_struct *tty, struct usb_serial_port *port,
|
||||
if (!urb)
|
||||
goto error_no_urb;
|
||||
|
||||
memcpy(buffer, buf, count);
|
||||
|
||||
usb_serial_debug_data(&port->dev, __func__, count, buffer);
|
||||
|
||||
/* The connected devices do not have a bulk write endpoint,
|
||||
|
@ -453,7 +453,7 @@ static int sierra_write(struct tty_struct *tty, struct usb_serial_port *port,
|
||||
goto error_simple;
|
||||
}
|
||||
|
||||
buffer = kmalloc(writesize, GFP_ATOMIC);
|
||||
buffer = kmemdup(buf, writesize, GFP_ATOMIC);
|
||||
if (!buffer) {
|
||||
retval = -ENOMEM;
|
||||
goto error_no_buffer;
|
||||
@ -465,8 +465,6 @@ static int sierra_write(struct tty_struct *tty, struct usb_serial_port *port,
|
||||
goto error_no_urb;
|
||||
}
|
||||
|
||||
memcpy(buffer, buf, writesize);
|
||||
|
||||
usb_serial_debug_data(&port->dev, __func__, writesize, buffer);
|
||||
|
||||
usb_fill_bulk_urb(urb, serial->dev,
|
||||
@ -737,7 +735,8 @@ static void sierra_close(struct usb_serial_port *port)
|
||||
|
||||
/*
|
||||
* Need to take susp_lock to make sure port is not already being
|
||||
* resumed, but no need to hold it due to initialized
|
||||
* resumed, but no need to hold it due to the tty-port initialized
|
||||
* flag.
|
||||
*/
|
||||
spin_lock_irq(&intfdata->susp_lock);
|
||||
if (--intfdata->open_ports == 0)
|
||||
|
@ -295,7 +295,7 @@ static int serial_open(struct tty_struct *tty, struct file *filp)
|
||||
*
|
||||
* Shut down a USB serial port. Serialized against activate by the
|
||||
* tport mutex and kept to matching open/close pairs
|
||||
* of calls by the initialized flag.
|
||||
* of calls by the tty-port initialized flag.
|
||||
*
|
||||
* Not called if tty is console.
|
||||
*/
|
||||
|
@ -390,7 +390,8 @@ void usb_wwan_close(struct usb_serial_port *port)
|
||||
|
||||
/*
|
||||
* Need to take susp_lock to make sure port is not already being
|
||||
* resumed, but no need to hold it due to initialized
|
||||
* resumed, but no need to hold it due to the tty-port initialized
|
||||
* flag.
|
||||
*/
|
||||
spin_lock_irq(&intfdata->susp_lock);
|
||||
if (--intfdata->open_ports == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user