staging: comedi: dt282x: refactor dt282x_ns_to_timer()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 23 Mar 2016 19:24:29 +0000 (12:24 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Mar 2016 14:30:36 +0000 (07:30 -0700)
commit581867bd9151ee77fad4b0fe47af96d923ac9ec2
treef9bdee8e84827959db6472dc3103232238156158
parent47470216cc2fe413156aa44d7ae55e65712b0931
staging: comedi: dt282x: refactor dt282x_ns_to_timer()

Define the pacer clock limits and remove the magic numbers. Refactor
the code to use a common path to return the actual 'ns' timing and
the timer divisor value.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/dt282x.c