Skip to contentSkip to conversation

USB-SERIAL cp210x: Remove double usb_control_msg from cp210x_set_config

PATCH New Michael Brunner 1 participant 1 message Mar 10, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 USB-SERIAL cp210x: Remove double usb_control_msg from cp210x_set_config

This patch removes a double usb_control_msg that sets the cp210x configuration registers a second time when calling cp210x_set_config. For data sizes >2 the second write gets corrupted.
The patch has been created against 2.6.34-rc1, but all cp210x driver revisions are affected.

---
 drivers/usb/serial/cp210x.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)
drivers/usb/serial/cp210x.c +0 -5
index 507382b..ec9b044 100644
@@ -313,11 +313,6 @@ static int cp210x_set_config(struct usb_serial_port *port, 
        return -EPROTO;
    }
 
-   /* Single data value */
-   result = usb_control_msg(serial->dev,
-           usb_sndctrlpipe(serial->dev, 0),
-           request, REQTYPE_HOST_TO_DEVICE, data[0],
-           0, NULL, 0, 300);
    return 0;
 }