diff options
author | Johan Hovold <jhovold@gmail.com> | 2012-01-15 18:36:49 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-24 14:49:43 -0500 |
commit | 34b76fcaee574017862ea3fa0efdcd77a9d0e57d (patch) | |
tree | 64f7301815e19049db5ea0a00d8a85abc293d169 /drivers/usb | |
parent | 7f482fc88ac47662228d6b1f05759797c8936a30 (diff) |
USB: cp210x: fix up set_termios variables
[Based on a patch from Johan, mangled by gregkh to keep things in line]
Fix up the variable usage in the set_termios call.
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: Preston Fick <preston.fick@silabs.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/serial/cp210x.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index f4267886e255..1270e024bb3e 100644 --- a/drivers/usb/serial/cp210x.c +++ b/drivers/usb/serial/cp210x.c | |||
@@ -580,7 +580,8 @@ static void cp210x_set_termios(struct tty_struct *tty, | |||
580 | struct usb_serial_port *port, struct ktermios *old_termios) | 580 | struct usb_serial_port *port, struct ktermios *old_termios) |
581 | { | 581 | { |
582 | unsigned int cflag, old_cflag; | 582 | unsigned int cflag, old_cflag; |
583 | unsigned int baud = 0, bits; | 583 | u32 baud; |
584 | unsigned int bits; | ||
584 | unsigned int modem_ctl[4]; | 585 | unsigned int modem_ctl[4]; |
585 | 586 | ||
586 | dbg("%s - port %d", __func__, port->number); | 587 | dbg("%s - port %d", __func__, port->number); |
@@ -596,7 +597,7 @@ static void cp210x_set_termios(struct tty_struct *tty, | |||
596 | if (baud != tty_termios_baud_rate(old_termios) && baud != 0) { | 597 | if (baud != tty_termios_baud_rate(old_termios) && baud != 0) { |
597 | dbg("%s - Setting baud rate to %d baud", __func__, | 598 | dbg("%s - Setting baud rate to %d baud", __func__, |
598 | baud); | 599 | baud); |
599 | if (cp210x_set_config(port, CP210X_SET_BAUDRATE, &baud, 4)) { | 600 | if (cp210x_set_config(port, CP210X_SET_BAUDRATE, &baud, sizeof(baud))) { |
600 | dbg("Baud rate requested not supported by device"); | 601 | dbg("Baud rate requested not supported by device"); |
601 | baud = tty_termios_baud_rate(old_termios); | 602 | baud = tty_termios_baud_rate(old_termios); |
602 | } | 603 | } |