[PATCH] staging/serqt_usb2: Refactor qt_status_change_check() in serqt_usb2.c

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

 



Improved position to increment variable i,
And typo fixes.

Signed-off-by: YAMANE Toshiaki <yamanetoshi@xxxxxxxxx>
---
 drivers/staging/serqt_usb2/serqt_usb2.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/serqt_usb2/serqt_usb2.c b/drivers/staging/serqt_usb2/serqt_usb2.c
index 1b3e995..095d6f2 100644
--- a/drivers/staging/serqt_usb2/serqt_usb2.c
+++ b/drivers/staging/serqt_usb2/serqt_usb2.c
@@ -309,26 +309,26 @@ static void qt_status_change_check(struct tty_struct *tty,
 			case 0x00:
 				if (i > (RxCount - 4)) {
 					dev_dbg(&port->dev,
-						"Illegal escape seuences in received data\n");
+						"Illegal escape sequence in received data\n");
 					break;
 				}
 
-				ProcessLineStatus(qt_port, data[i + 3]);
-
 				i += 3;
+				ProcessLineStatus(qt_port, data[i]);
+
 				flag = 1;
 				break;
 
 			case 0x01:
 				if (i > (RxCount - 4)) {
 					dev_dbg(&port->dev,
-						"Illegal escape seuences in received data\n");
+						"Illegal escape sequence in received data\n");
 					break;
 				}
 
-				ProcessModemStatus(qt_port, data[i + 3]);
-
 				i += 3;
+				ProcessModemStatus(qt_port, data[i]);
+
 				flag = 1;
 				break;
 
-- 
1.7.9.5

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux