aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/cp210x.c
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2012-01-15 18:36:50 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2012-01-24 14:52:13 -0500
commitbe125d9c8d59560e7cc2d6e2b65c8fd233498ab7 (patch)
tree304e3a4d7d8e0b47d6796db31f3470a269a6c1ba /drivers/usb/serial/cp210x.c
parent34b76fcaee574017862ea3fa0efdcd77a9d0e57d (diff)
USB: cp210x: do not map baud rates to B0
We do not implement B0 hangup yet so map low baudrates to 300bps. 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/cp210x.c')
-rw-r--r--drivers/usb/serial/cp210x.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
index 1270e024bb3..ad7599ed5df 100644
--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -363,8 +363,8 @@ static inline int cp210x_set_config_single(struct usb_serial_port *port,
363 * Quantises the baud rate as per AN205 Table 1 363 * Quantises the baud rate as per AN205 Table 1
364 */ 364 */
365static unsigned int cp210x_quantise_baudrate(unsigned int baud) { 365static unsigned int cp210x_quantise_baudrate(unsigned int baud) {
366 if (baud <= 56) baud = 0; 366 if (baud <= 300)
367 else if (baud <= 300) baud = 300; 367 baud = 300;
368 else if (baud <= 600) baud = 600; 368 else if (baud <= 600) baud = 600;
369 else if (baud <= 1200) baud = 1200; 369 else if (baud <= 1200) baud = 1200;
370 else if (baud <= 1800) baud = 1800; 370 else if (baud <= 1800) baud = 1800;