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>
/* 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);