Commit b6de1f90 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'usb-serial-5.20-rc1' of...

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
parents d5e22360 688ee1d1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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.
		 */
+1 −3
Original line number Diff line number Diff line
@@ -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,
+2 −2
Original line number Diff line number Diff line
@@ -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;
	}
+1 −1
Original line number Diff line number Diff line
@@ -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.
		 */
+1 −3
Original line number Diff line number Diff line
@@ -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,
Loading