H Hartley Sweeten 1265c22fc8 staging: comedi: das1800: don't calc pacer divisors twice
The analog input async command can use the pacer for the scan_begin_src
or the convert_src. The (*do_cmdtest) calculates the divisors when
validating the cmd argument.

There is no reason to recalc the divisors in the (*do_cmd). Just use the
values from the private data.

For aesthetics, rename the setup_counters() function so it has namespace
associated with the driver. Refactor the function to use the values from
the private data and absorb das1800_set_frequency() to clarify the code.
Refactor the function to use the i8254_set_mode() and i8254_write()
helpers instead of i8254_load(). This allows us to use the I8254_* defines
when setting the mode to clarify the code.

This function will not fail so change the return type to void to simplify
the (*do_cmd) a bit.

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>
2014-05-03 20:06:31 -04:00
..
2014-04-05 15:37:40 -07:00
2014-04-05 15:37:40 -07:00
2014-04-18 16:57:53 -07:00
2014-04-24 23:46:58 +02:00
2014-04-08 13:27:40 +02:00
2014-04-22 09:28:02 -07:00
2014-04-27 21:38:34 -07:00
2014-04-17 10:51:01 -07:00
2014-04-09 08:39:39 -07:00
2014-04-16 12:28:47 -07:00
2014-04-09 08:39:39 -07:00
2014-04-18 16:40:08 -07:00
2014-04-15 15:21:22 -05:00
2014-04-24 12:53:38 -07:00
2014-04-18 16:40:08 -07:00
2014-04-05 15:37:40 -07:00
2014-04-21 14:28:40 -07:00
2014-04-05 15:38:41 -07:00
2014-04-03 14:05:02 -07:00
2014-04-16 14:07:51 -07:00