Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 325625
b: refs/heads/master
c: 9b12daf
h: refs/heads/master
i:
  325623: af4a4de
v: v3
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Aug 10, 2012
1 parent f63af0d commit c8ebc12
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2d8a1001ee0e961a00ab460ff54ea9a321a56d2e
refs/heads/master: 9b12daf70815364d07bc0bbac41468098264f782
18 changes: 8 additions & 10 deletions trunk/drivers/staging/serqt_usb2/serqt_usb2.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,8 @@ static void qt_read_bulk_callback(struct urb *urb)
}

tty = tty_port_tty_get(&port->port);
if (!tty) {
dbg("%s - bad tty pointer - exiting", __func__);
if (!tty)
return;
}

data = urb->transfer_buffer;

Expand Down Expand Up @@ -364,7 +362,7 @@ static void qt_read_bulk_callback(struct urb *urb)
goto exit;
}

if (tty && RxCount) {
if (RxCount) {
flag_data = 0;
for (i = 0; i < RxCount; ++i) {
/* Look ahead code here */
Expand Down Expand Up @@ -428,7 +426,7 @@ static void qt_read_bulk_callback(struct urb *urb)
dbg("%s - failed resubmitting read urb, error %d",
__func__, result);
else {
if (tty && RxCount) {
if (RxCount) {
tty_flip_buffer_push(tty);
tty_schedule_flip(tty);
}
Expand Down Expand Up @@ -897,8 +895,6 @@ static int qt_open(struct tty_struct *tty,
* Put this here to make it responsive to stty and defaults set by
* the tty layer
*/
/* FIXME: is this needed? */
/* qt_set_termios(tty, port, NULL); */

/* Check to see if we've set up our endpoint info yet */
if (port0->open_ports == 1) {
Expand Down Expand Up @@ -1195,7 +1191,7 @@ static void qt_set_termios(struct tty_struct *tty,
struct usb_serial_port *port,
struct ktermios *old_termios)
{
struct ktermios *termios = tty->termios;
struct ktermios *termios = &tty->termios;
unsigned char new_LCR = 0;
unsigned int cflag = termios->c_cflag;
unsigned int index;
Expand All @@ -1204,7 +1200,7 @@ static void qt_set_termios(struct tty_struct *tty,

index = tty->index - port->serial->minor;

switch (cflag) {
switch (cflag & CSIZE) {
case CS5:
new_LCR |= SERIAL_5_DATA;
break;
Expand All @@ -1215,6 +1211,8 @@ static void qt_set_termios(struct tty_struct *tty,
new_LCR |= SERIAL_7_DATA;
break;
default:
termios->c_cflag &= ~CSIZE;
termios->c_cflag |= CS8;
case CS8:
new_LCR |= SERIAL_8_DATA;
break;
Expand Down Expand Up @@ -1301,7 +1299,7 @@ static void qt_set_termios(struct tty_struct *tty,
dbg(__FILE__ "BoxSetSW_FlowCtrl (diabling) failed\n");

}
tty->termios->c_cflag &= ~CMSPAR;
termios->c_cflag &= ~CMSPAR;
/* FIXME: Error cases should be returning the actual bits changed only */
}

Expand Down

0 comments on commit c8ebc12

Please sign in to comment.