USB: serial: cp210x: clean up CSIZE handling

CSIZE is two-bit wide and only CS5 through CS8 are possible values.

Signed-off-by: Johan Hovold <johan@kernel.org>
This commit is contained in:
Johan Hovold 2016-10-19 15:46:38 +02:00
parent 07d9a38068
commit c2b3355920
1 changed files with 1 additions and 8 deletions

View File

@ -929,17 +929,10 @@ static void cp210x_set_termios(struct tty_struct *tty,
dev_dbg(dev, "%s - data bits = 7\n", __func__);
break;
case CS8:
default:
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;
break;
}
if (cp210x_write_u16_reg(port, CP210X_SET_LINE_CTL, bits))
dev_dbg(dev, "Number of data bits requested not supported by device\n");