]> git.karo-electronics.de Git - karo-tx-linux.git/commit
staging: comedi: ni_labpc: fix 8254 timer programming
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 29 Apr 2014 19:59:56 +0000 (12:59 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 May 2014 00:06:35 +0000 (20:06 -0400)
commite74e98993da8dff62190c937d4371eda962e64b9
treeccdf9c41ee78d25d6f2b46cbcb67ed5d652d81c9
parent52c9e62cf3247cb0599197e7a27356e6a2513a80
staging: comedi: ni_labpc: fix 8254 timer programming

As pointed out by Ian Abbott, the i8254_load() function does not
use the I8254_MODE* values to specify the "mode".

The labpc_counter_load() function in this driver is passed an
I8254_MODE* value so we need to use the i8254_set_mode() and
i8254_write() helpers instead of i8254_load() to program the
timers.

The calls to labpc_counter_load() will not fail so change the
return to void and remove all the unnecessary error handling.

Similarly, change the return type of labpc_counter_set_mode() to
void and remove the unnecessary error handling.

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/ni_labpc.c