Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185305
b: refs/heads/master
c: 96679f6
h: refs/heads/master
i:
  185303: 5cb7941
v: v3
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Mar 2, 2010
1 parent a3be1a6 commit 562071f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 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: 401711cb575bbbdb100bc1a14cb2024dfc9b4869
refs/heads/master: 96679f6bd5e1ccb30671b81636b4fdc326e46d8a
22 changes: 4 additions & 18 deletions trunk/drivers/usb/serial/kobil_sct.c
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,6 @@ static void kobil_set_termios(struct tty_struct *tty,
unsigned short urb_val = 0;
int c_cflag = tty->termios->c_cflag;
speed_t speed;
void *settings;

priv = usb_get_serial_port_data(port);
if (priv->device_type == KOBIL_USBTWIN_PRODUCT_ID ||
Expand All @@ -647,25 +646,13 @@ static void kobil_set_termios(struct tty_struct *tty,
}
urb_val |= (c_cflag & CSTOPB) ? SUSBCR_SPASB_2StopBits :
SUSBCR_SPASB_1StopBit;

settings = kzalloc(50, GFP_KERNEL);
if (!settings)
return;

sprintf(settings, "%d ", speed);

if (c_cflag & PARENB) {
if (c_cflag & PARODD) {
if (c_cflag & PARODD)
urb_val |= SUSBCR_SPASB_OddParity;
strcat(settings, "Odd Parity");
} else {
else
urb_val |= SUSBCR_SPASB_EvenParity;
strcat(settings, "Even Parity");
}
} else {
} else
urb_val |= SUSBCR_SPASB_NoParity;
strcat(settings, "No Parity");
}
tty->termios->c_cflag &= ~CMSPAR;
tty_encode_baud_rate(tty, speed, speed);

Expand All @@ -675,11 +662,10 @@ static void kobil_set_termios(struct tty_struct *tty,
USB_TYPE_VENDOR | USB_RECIP_ENDPOINT | USB_DIR_OUT,
urb_val,
0,
settings,
NULL,
0,
KOBIL_TIMEOUT
);
kfree(settings);
}

static int kobil_ioctl(struct tty_struct *tty, struct file *file,
Expand Down

0 comments on commit 562071f

Please sign in to comment.