Skip to content

Commit

Permalink
USB: ftdi_sio: fix max-packet-size warning
Browse files Browse the repository at this point in the history
Promote max-packet-size-override message to warning level and use the
port device for logging, while using actual endpoint numbers in the
message itself.

Signed-off-by: Johan Hovold <johan@kernel.org>
  • Loading branch information
Johan Hovold committed Jul 7, 2014
1 parent af6f9e8 commit a90d84a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/usb/serial/ftdi_sio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1563,8 +1563,6 @@ static void ftdi_set_max_packet_size(struct usb_serial_port *port)
{
struct ftdi_private *priv = usb_get_serial_port_data(port);
struct usb_serial *serial = port->serial;
struct usb_device *udev = serial->dev;

struct usb_interface *interface = serial->interface;
struct usb_endpoint_descriptor *ep_desc;

Expand All @@ -1583,7 +1581,8 @@ static void ftdi_set_max_packet_size(struct usb_serial_port *port)
ep_desc = &interface->cur_altsetting->endpoint[i].desc;
if (ep_desc->wMaxPacketSize == 0) {
ep_desc->wMaxPacketSize = cpu_to_le16(0x40);
dev_info(&udev->dev, "Overriding wMaxPacketSize on endpoint %d\n", i);
dev_warn(&port->dev, "Overriding wMaxPacketSize on endpoint %d\n",
usb_endpoint_num(ep_desc));
}
}

Expand Down

0 comments on commit a90d84a

Please sign in to comment.