[PATCH 3/5] USB: ftdi_sio: fix max-packet-size warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 drivers/usb/serial/ftdi_sio.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index a988a3b86ee1..19f1114d36c7 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -1561,8 +1561,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;
 
@@ -1581,7 +1579,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));
 		}
 	}
 
-- 
1.8.5.5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux