USB: serial: cp210x: generalise CP2102N line-speed handling
authorJohan Hovold <johan@kernel.org>
Wed, 18 Jul 2018 12:25:00 +0000 (14:25 +0200)
committerJohan Hovold <johan@kernel.org>
Wed, 18 Jul 2018 19:54:49 +0000 (21:54 +0200)
commit7aecd7fc5d95f1447611ab5e14db5ab9549f979c
tree926ec67929eab29ab11b45568a21d93a7a1f52b9
parent6f0bcf720ea81e90e6066d14d5506565049a2eb5
USB: serial: cp210x: generalise CP2102N line-speed handling

The CP2102N equations for determining the actual baud rate can be used
also for other device types, so let's factor it out.

Note that this removes the now unused cp210x_is_cp2102n() helper.

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