summaryrefslogtreecommitdiff
path: root/drivers/usb/serial/pl2303.c
diff options
context:
space:
mode:
authorFrank Schäfer <fschaefer.oss@googlemail.com>2013-07-29 18:33:22 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-29 11:14:16 -0700
commit02f00c4a9183ebf15aa50e57391b0f44e2f092c2 (patch)
tree8ea0336ffd3ade3ff64b39ea4a2da97632f2d595 /drivers/usb/serial/pl2303.c
parent78283dd29e647775cb1e63a4d6554b3090b9a9ff (diff)
USB: serial: pl2303: fix the upper baud rate limit check for type_0/1 chips
Fixes the following regression that has been introduced recently with commit b2d6d98fc7: With type_0 and type_1 chips - all baud rates < 1228800 baud are rounded up to 1228800 baud - the device silently runs at 9600 baud for all baud rates > 1228800 baud Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/pl2303.c')
-rw-r--r--drivers/usb/serial/pl2303.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 299a0ffcb165..1e6de4cd079d 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -303,7 +303,7 @@ static void pl2303_encode_baudrate(struct tty_struct *tty,
/* type_0, type_1 only support up to 1228800 baud */
if (spriv->type != HX)
- baud = max_t(int, baud, 1228800);
+ baud = min_t(int, baud, 1228800);
if (baud <= 115200) {
put_unaligned_le32(baud, buf);