tty: omap-serial: pull out calculation from baud_is_mode16
authorFrans Klaver <frans.klaver@xsens.com>
Wed, 24 Sep 2014 07:55:22 +0000 (09:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 29 Sep 2014 01:24:06 +0000 (21:24 -0400)
commit13d6ceb4c4fe1e9688e19b15b123b1830c596cf1
treea3e3669c6295641831a9b31e3bd52c8340ec85a1
parentdc3187564e61260f49eceb21a4e7eb5e4428e90a
tty: omap-serial: pull out calculation from baud_is_mode16

To determine the correct divisor, we need to know the difference between
the desired baud rate and the actual baud rate. The calculation for this
difference is implemented twice within omap_serial_baud_is_mode16().
Pull out the calculation for easier maintenance.

While at it, remove the CamelCasing from the variable names.

Signed-off-by: Frans Klaver <frans.klaver@xsens.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/omap-serial.c