[PATCH 2/6 resend] ark3116: Remove unused "expected" read value

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

 



ARK3116_RCV's expected value parameter appears to have come
 from USB traces and is not used, so remove it.

Signed-off-by: Mike McCormack <mikem@xxxxxxxxxx>
---
 drivers/usb/serial/ark3116.c |   37 ++++++++++++++++++-------------------
 1 files changed, 18 insertions(+), 19 deletions(-)

diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c
index 68cbbfa..02bc72a 100644
--- a/drivers/usb/serial/ark3116.c
+++ b/drivers/usb/serial/ark3116.c
@@ -55,8 +55,7 @@ static inline int ARK3116_SND(struct usb_serial *serial,
 }
 
 static inline int ARK3116_RCV(struct usb_serial *serial,
-			       __u16 index, __u8 expected,
-			       char *buf)
+			       __u16 index, char *buf)
 {
 	return usb_control_msg(serial->dev,
 				 usb_rcvctrlpipe(serial->dev, 0),
@@ -100,27 +99,27 @@ static int ark3116_attach(struct usb_serial *serial)
 	}
 
 	/* <-- seq7 */
-	ARK3116_RCV(serial, 0x0003, 0x00, buf);
+	ARK3116_RCV(serial, 0x0003, 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, 0x0004, 0x00, buf);
+	ARK3116_RCV(serial, 0x0004, buf);
 	ARK3116_SND(serial, 0x0000, 0x0004);
 
 	/* 14 */
-	ARK3116_RCV(serial, 0x0004, 0x00, buf);
+	ARK3116_RCV(serial, 0x0004, buf);
 	ARK3116_SND(serial, 0x0000, 0x0004);
 
 	/* 16 */
-	ARK3116_RCV(serial, 0x0004, 0x00, buf);
+	ARK3116_RCV(serial, 0x0004, buf);
 	/* --> seq17 */
 	ARK3116_SND(serial, 0x0001, 0x0004);
 
 	/* <-- seq18 */
-	ARK3116_RCV(serial, 0x0004, 0x01, buf);
+	ARK3116_RCV(serial, 0x0004, buf);
 
 	/* --> seq19 */
 	ARK3116_SND(serial, 0x0003, 0x0004);
@@ -128,7 +127,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, 0x0006, 0xFF, buf);
+	ARK3116_RCV(serial, 0x0006, buf);
 
 	/* set 9600 baud & do some init?! */
 	ARK3116_SND(serial, 0x0083, 0x0003);
@@ -137,9 +136,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, 0x0004, 0x03, buf);
+	ARK3116_RCV(serial, 0x0004, buf);
 	ARK3116_SND(serial, 0x0000, 0x0003);
-	ARK3116_RCV(serial, 0x0003, 0x00, buf);
+	ARK3116_RCV(serial, 0x0003, buf);
 	ARK3116_SND(serial, 0x0003, 0x0003);
 
 	kfree(buf);
@@ -270,7 +269,7 @@ static void ark3116_set_termios(struct tty_struct *tty,
 		ark3116_baud = 3000000 / baud;
 
 	/* ? */
-	ARK3116_RCV(serial, 0x0003, 0x03, buf);
+	ARK3116_RCV(serial, 0x0003, buf);
 
 	/* offset = buf[0]; */
 	/* offset = 0x03; */
@@ -286,12 +285,12 @@ static void ark3116_set_termios(struct tty_struct *tty,
 	ARK3116_SND(serial, 0x0003, 0x0003);
 
 	/* ? */
-	ARK3116_RCV(serial, 0x0004, 0x03, buf);
+	ARK3116_RCV(serial, 0x0004, 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, 0x0003, 0x00, buf);
+	ARK3116_RCV(serial, 0x0003, buf);
 	ARK3116_SND(serial, config, 0x0003);
 
 	if (cflag & CRTSCTS)
@@ -324,29 +323,29 @@ static int ark3116_open(struct tty_struct *tty, struct usb_serial_port *port)
 		goto err_out;
 
 	/* open */
-	ARK3116_RCV(serial, 0x0003, 0x02, buf);
+	ARK3116_RCV(serial, 0x0003, buf);
 
 	ARK3116_SND(serial, 0x0082, 0x0003);
 	ARK3116_SND(serial, 0x001A, 0x0000);
 	ARK3116_SND(serial, 0x0000, 0x0001);
 	ARK3116_SND(serial, 0x0002, 0x0003);
 
-	ARK3116_RCV(serial, 0x0004, 0x03, buf);
+	ARK3116_RCV(serial, 0x0004, buf);
 	ARK3116_SND(serial, 0x0002, 0x0004);
 
-	ARK3116_RCV(serial, 0x0004, 0x02, buf);
+	ARK3116_RCV(serial, 0x0004, buf);
 	ARK3116_SND(serial, 0x0000, 0x0004);
 
-	ARK3116_RCV(serial, 0x0004, 0x00, buf);
+	ARK3116_RCV(serial, 0x0004, buf);
 
 	ARK3116_SND(serial, 0x0001, 0x0004);
 
-	ARK3116_RCV(serial, 0x0004, 0x01, buf);
+	ARK3116_RCV(serial, 0x0004, buf);
 
 	ARK3116_SND(serial, 0x0003, 0x0004);
 
 	/* returns different values (control lines?!) */
-	ARK3116_RCV(serial, 0x0006, 0xFF, buf);
+	ARK3116_RCV(serial, 0x0006, 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

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

  Powered by Linux