USB: serial: cp210x: make line-speed quantisation data driven
authorJohan Hovold <johan@kernel.org>
Wed, 18 Jul 2018 12:24:57 +0000 (14:24 +0200)
committerJohan Hovold <johan@kernel.org>
Wed, 18 Jul 2018 19:53:31 +0000 (21:53 +0200)
commit95fd4f47c857cf887ec0f6718ffb6a6ec3b62bd6
treea49ce24e3b843100421907531aa40d67a42465c6
parent3528651e89aa044347ca06db6e9a106aa9aff914
USB: serial: cp210x: make line-speed quantisation data driven

Older cp210x devices only support a fixed set of line speeds to which a
requested speed is mapped. Reimplement this mapping using a table
instead of a long if-else construct.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/cp210x.c