Skip to content

Commit

Permalink
USB: serial: cp210x: clean up CSIZE handling
Browse files Browse the repository at this point in the history
CSIZE is two-bit wide and only CS5 through CS8 are possible values.

Signed-off-by: Johan Hovold <johan@kernel.org>
  • Loading branch information
Johan Hovold committed Oct 24, 2016
1 parent 07d9a38 commit c2b3355
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions drivers/usb/serial/cp210x.c
Original file line number Diff line number Diff line change
Expand Up @@ -929,16 +929,9 @@ static void cp210x_set_termios(struct tty_struct *tty,
dev_dbg(dev, "%s - data bits = 7\n", __func__);
break;
case CS8:
bits |= BITS_DATA_8;
dev_dbg(dev, "%s - data bits = 8\n", __func__);
break;
/*case CS9:
bits |= BITS_DATA_9;
dev_dbg(dev, "%s - data bits = 9\n", __func__);
break;*/
default:
dev_dbg(dev, "cp210x driver does not support the number of bits requested, using 8 bit mode\n");
bits |= BITS_DATA_8;
dev_dbg(dev, "%s - data bits = 8\n", __func__);
break;
}
if (cp210x_write_u16_reg(port, CP210X_SET_LINE_CTL, bits))
Expand Down

0 comments on commit c2b3355

Please sign in to comment.