ARK3116_RCV's "value" parameter is always 0, so hard code it. Signed-off-by: Mike McCormack <mikem@xxxxxxxxxx> --- drivers/usb/serial/ark3116.c | 38 +++++++++++++++++++------------------- 1 files changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c index 54220ad..68cbbfa 100644 --- a/drivers/usb/serial/ark3116.c +++ b/drivers/usb/serial/ark3116.c @@ -55,12 +55,12 @@ static inline int ARK3116_SND(struct usb_serial *serial, } static inline int ARK3116_RCV(struct usb_serial *serial, - __u16 value, __u16 index, __u8 expected, + __u16 index, __u8 expected, char *buf) { return usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), - 0xfe, 0xc0, value, index, + 0xfe, 0xc0, 0, index, buf, 0x0000001, 1000); } @@ -100,27 +100,27 @@ static int ark3116_attach(struct usb_serial *serial) } /* <-- seq7 */ - ARK3116_RCV(serial, 0x0000, 0x0003, 0x00, buf); + ARK3116_RCV(serial, 0x0003, 0x00, buf); ARK3116_SND(serial, 0x0080, 0x0003); ARK3116_SND(serial, 0x001A, 0x0000); ARK3116_SND(serial, 0x0000, 0x0001); ARK3116_SND(serial, 0x0000, 0x0003); /* <-- seq12 */ - ARK3116_RCV(serial, 0x0000, 0x0004, 0x00, buf); + ARK3116_RCV(serial, 0x0004, 0x00, buf); ARK3116_SND(serial, 0x0000, 0x0004); /* 14 */ - ARK3116_RCV(serial, 0x0000, 0x0004, 0x00, buf); + ARK3116_RCV(serial, 0x0004, 0x00, buf); ARK3116_SND(serial, 0x0000, 0x0004); /* 16 */ - ARK3116_RCV(serial, 0x0000, 0x0004, 0x00, buf); + ARK3116_RCV(serial, 0x0004, 0x00, buf); /* --> seq17 */ ARK3116_SND(serial, 0x0001, 0x0004); /* <-- seq18 */ - ARK3116_RCV(serial, 0x0000, 0x0004, 0x01, buf); + ARK3116_RCV(serial, 0x0004, 0x01, buf); /* --> seq19 */ ARK3116_SND(serial, 0x0003, 0x0004); @@ -128,7 +128,7 @@ static int ark3116_attach(struct usb_serial *serial) /* <-- seq20 */ /* seems like serial port status info (RTS, CTS, ...) */ /* returns modem control line status?! */ - ARK3116_RCV(serial, 0x0000, 0x0006, 0xFF, buf); + ARK3116_RCV(serial, 0x0006, 0xFF, buf); /* set 9600 baud & do some init?! */ ARK3116_SND(serial, 0x0083, 0x0003); @@ -137,9 +137,9 @@ static int ark3116_attach(struct usb_serial *serial) if (is_irda(serial)) ARK3116_SND(serial, 0x0000, 0x0009); ARK3116_SND(serial, 0x0003, 0x0003); - ARK3116_RCV(serial, 0x0000, 0x0004, 0x03, buf); + ARK3116_RCV(serial, 0x0004, 0x03, buf); ARK3116_SND(serial, 0x0000, 0x0003); - ARK3116_RCV(serial, 0x0000, 0x0003, 0x00, buf); + ARK3116_RCV(serial, 0x0003, 0x00, buf); ARK3116_SND(serial, 0x0003, 0x0003); kfree(buf); @@ -270,7 +270,7 @@ static void ark3116_set_termios(struct tty_struct *tty, ark3116_baud = 3000000 / baud; /* ? */ - ARK3116_RCV(serial, 0x0000, 0x0003, 0x03, buf); + ARK3116_RCV(serial, 0x0003, 0x03, buf); /* offset = buf[0]; */ /* offset = 0x03; */ @@ -286,12 +286,12 @@ static void ark3116_set_termios(struct tty_struct *tty, ARK3116_SND(serial, 0x0003, 0x0003); /* ? */ - ARK3116_RCV(serial, 0x0000, 0x0004, 0x03, buf); + ARK3116_RCV(serial, 0x0004, 0x03, buf); ARK3116_SND(serial, 0x0000, 0x0003); /* set data bit count, stop bit count & parity: */ dbg("updating bit count, stop bit or parity (cfg=0x%02X)", config); - ARK3116_RCV(serial, 0x0000, 0x0003, 0x00, buf); + ARK3116_RCV(serial, 0x0003, 0x00, buf); ARK3116_SND(serial, config, 0x0003); if (cflag & CRTSCTS) @@ -324,29 +324,29 @@ static int ark3116_open(struct tty_struct *tty, struct usb_serial_port *port) goto err_out; /* open */ - ARK3116_RCV(serial, 0x0000, 0x0003, 0x02, buf); + ARK3116_RCV(serial, 0x0003, 0x02, buf); ARK3116_SND(serial, 0x0082, 0x0003); ARK3116_SND(serial, 0x001A, 0x0000); ARK3116_SND(serial, 0x0000, 0x0001); ARK3116_SND(serial, 0x0002, 0x0003); - ARK3116_RCV(serial, 0x0000, 0x0004, 0x03, buf); + ARK3116_RCV(serial, 0x0004, 0x03, buf); ARK3116_SND(serial, 0x0002, 0x0004); - ARK3116_RCV(serial, 0x0000, 0x0004, 0x02, buf); + ARK3116_RCV(serial, 0x0004, 0x02, buf); ARK3116_SND(serial, 0x0000, 0x0004); - ARK3116_RCV(serial, 0x0000, 0x0004, 0x00, buf); + ARK3116_RCV(serial, 0x0004, 0x00, buf); ARK3116_SND(serial, 0x0001, 0x0004); - ARK3116_RCV(serial, 0x0000, 0x0004, 0x01, buf); + ARK3116_RCV(serial, 0x0004, 0x01, buf); ARK3116_SND(serial, 0x0003, 0x0004); /* returns different values (control lines?!) */ - ARK3116_RCV(serial, 0x0000, 0x0006, 0xFF, buf); + ARK3116_RCV(serial, 0x0006, 0xFF, buf); /* initialise termios */ if (tty) -- 1.5.6.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