[PATCH 4/4] ark3116: Remove unused function parameter

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

 



Remove ark3116_rcv's value parameter and hard code it as 0.

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

diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c
index 4255f59..b0dc53e 100644
--- a/drivers/usb/serial/ark3116.c
+++ b/drivers/usb/serial/ark3116.c
@@ -56,12 +56,11 @@ static inline int ark3116_snd(struct usb_serial *serial,
 }
 
 static inline int ark3116_rcv(struct usb_serial *serial,
-			      u16 value, u16 index,
-			      unsigned char *buf)
+			      u16 index, unsigned char *buf)
 {
 	return usb_control_msg(serial->dev,
 				 usb_rcvctrlpipe(serial->dev, 0),
-				 0xfe, 0xc0, value, index,
+				 0xfe, 0xc0, 0, index,
 				 buf, 0x0000001, 1000);
 }
 
@@ -86,27 +85,27 @@ static int ark3116_attach(struct usb_serial *serial)
 	}
 
 	/* <-- seq7 */
-	ark3116_rcv(serial, 0x0000, UART_LCR, buf);
+	ark3116_rcv(serial, UART_LCR, buf);
 	ark3116_snd(serial, 0x0080, UART_LCR);
 	ark3116_snd(serial, 0x001A, UART_DLL);
 	ark3116_snd(serial, 0x0000, UART_DLM);
 	ark3116_snd(serial, 0x0000, UART_LCR);
 
 	/* <-- seq12 */
-	ark3116_rcv(serial, 0x0000, UART_MCR, buf);
+	ark3116_rcv(serial, UART_MCR, buf);
 	ark3116_snd(serial, 0x0000, UART_MCR);
 
 	/* 14 */
-	ark3116_rcv(serial, 0x0000, UART_MCR, buf);
+	ark3116_rcv(serial, UART_MCR, buf);
 	ark3116_snd(serial, 0x0000, UART_MCR);
 
 	/* 16 */
-	ark3116_rcv(serial, 0x0000, UART_MCR, buf);
+	ark3116_rcv(serial, UART_MCR, buf);
 	/* --> seq17 */
 	ark3116_snd(serial, 0x0001, UART_MCR);
 
 	/* <-- seq18 */
-	ark3116_rcv(serial, 0x0000, UART_MCR, buf);
+	ark3116_rcv(serial, UART_MCR, buf);
 
 	/* --> seq19 */
 	ark3116_snd(serial, 0x0003, UART_MCR);
@@ -114,7 +113,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, UART_MSR, buf);
+	ark3116_rcv(serial, UART_MSR, buf);
 
 	/* set 9600 baud & do some init?! */
 	ark3116_snd(serial, 0x0083, UART_LCR);
@@ -123,9 +122,9 @@ static int ark3116_attach(struct usb_serial *serial)
 	if (is_irda(serial))
 		ark3116_snd(serial, 0x0000, 0x0009);
 	ark3116_snd(serial, 0x0003, UART_LCR);
-	ark3116_rcv(serial, 0x0000, UART_MCR, buf);
+	ark3116_rcv(serial, UART_MCR, buf);
 	ark3116_snd(serial, 0x0000, UART_LCR);
-	ark3116_rcv(serial, 0x0000, UART_LCR, buf);
+	ark3116_rcv(serial, UART_LCR, buf);
 	ark3116_snd(serial, 0x0003, UART_LCR);
 
 	return 0;
@@ -248,7 +247,7 @@ static void ark3116_set_termios(struct tty_struct *tty,
 		ark3116_baud = 3000000 / baud;
 
 	/* ? */
-	ark3116_rcv(serial, 0x0000, UART_LCR, buf);
+	ark3116_rcv(serial, UART_LCR, buf);
 
 	/* set baudrate */
 	dbg("setting baudrate to %d (->reg=%d)", baud, ark3116_baud);
@@ -258,12 +257,12 @@ static void ark3116_set_termios(struct tty_struct *tty,
 	ark3116_snd(serial, 0x0003, UART_LCR);
 
 	/* ? */
-	ark3116_rcv(serial, 0x0000, UART_MCR, buf);
+	ark3116_rcv(serial, UART_MCR, buf);
 	ark3116_snd(serial, 0x0000, UART_LCR);
 
 	/* set data bit count, stop bit count & parity: */
 	dbg("updating bit count, stop bit or parity (cfg=0x%02X)", config);
-	ark3116_rcv(serial, 0x0000, UART_LCR, buf);
+	ark3116_rcv(serial, UART_LCR, buf);
 	ark3116_snd(serial, config, UART_LCR);
 
 	if (cflag & CRTSCTS)
@@ -286,29 +285,29 @@ static int ark3116_open(struct tty_struct *tty, struct usb_serial_port *port)
 		goto err_out;
 
 	/* open */
-	ark3116_rcv(serial, 0x0000, UART_LCR, buf);
+	ark3116_rcv(serial, UART_LCR, buf);
 
 	ark3116_snd(serial, 0x0082, UART_LCR);
 	ark3116_snd(serial, 0x001A, UART_DLL);
 	ark3116_snd(serial, 0x0000, UART_DLM);
 	ark3116_snd(serial, 0x0002, UART_LCR);
 
-	ark3116_rcv(serial, 0x0000, UART_MCR, buf);
+	ark3116_rcv(serial, UART_MCR, buf);
 	ark3116_snd(serial, 0x0002, UART_MCR);
 
-	ark3116_rcv(serial, 0x0000, UART_MCR, buf);
+	ark3116_rcv(serial, UART_MCR, buf);
 	ark3116_snd(serial, 0x0000, UART_MCR);
 
-	ark3116_rcv(serial, 0x0000, UART_MCR, buf);
+	ark3116_rcv(serial, UART_MCR, buf);
 
 	ark3116_snd(serial, 0x0001, UART_MCR);
 
-	ark3116_rcv(serial, 0x0000, UART_MCR, buf);
+	ark3116_rcv(serial, UART_MCR, buf);
 
 	ark3116_snd(serial, 0x0003, UART_MCR);
 
 	/* returns different values (control lines?!) */
-	ark3116_rcv(serial, 0x0000, UART_MSR, buf);
+	ark3116_rcv(serial, UART_MSR, buf);
 
 	/* initialise termios */
 	if (tty)
@@ -365,7 +364,7 @@ static int ark3116_tiocmget(struct tty_struct *tty, struct file *file)
 	 */
 
 	/* read register */
-	ark3116_rcv(serial, 0x0000, UART_MSR, &temp);
+	ark3116_rcv(serial, UART_MSR, &temp);
 
 	/* i do not really know if bit4=CTS and bit6=DSR... just a
 	 * quick guess!
-- 
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