diff options
author | Johan Hovold <jhovold@gmail.com> | 2012-01-15 18:36:52 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-24 14:58:46 -0500 |
commit | cdc32fd6f7b2b2580d7f1b74563f888e4dd9eb8a (patch) | |
tree | 4ad0042e30d0d678c953c383a9b0a2253bbf5813 /drivers/usb/serial | |
parent | e5990874e511d5bbca23b3396419480cb2ca0ee7 (diff) |
USB: cp210x: initialise baud rate at open
The newer cp2104 devices require the baud rate to be initialised after
power on. Make sure it is set when port is opened.
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: Preston Fick <preston.fick@silabs.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r-- | drivers/usb/serial/cp210x.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index 2d2d23933ba6..5c3e8592fd22 100644 --- a/drivers/usb/serial/cp210x.c +++ b/drivers/usb/serial/cp210x.c | |||
@@ -417,6 +417,10 @@ static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
417 | /* Configure the termios structure */ | 417 | /* Configure the termios structure */ |
418 | cp210x_get_termios(tty, port); | 418 | cp210x_get_termios(tty, port); |
419 | 419 | ||
420 | /* The baud rate must be initialised on cp2104 */ | ||
421 | if (tty) | ||
422 | cp210x_change_speed(tty, port, NULL); | ||
423 | |||
420 | return usb_serial_generic_open(tty, port); | 424 | return usb_serial_generic_open(tty, port); |
421 | } | 425 | } |
422 | 426 | ||