OSDN Git Service

staging: comedi: ni_mio_common: refactor gpct to stc register handling
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 1 May 2015 21:58:28 +0000 (14:58 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 9 May 2015 17:05:03 +0000 (19:05 +0200)
commitcfdb3429da1c481ea8774588ca9268a447108526
treefaf45f58cdacdb64a6e051322301892b1a976179
parent2475c548e77dda4b7815bb81f65d04242d46d6fb
staging: comedi: ni_mio_common: refactor gpct to stc register handling

The NI General Purpose Counter Timer (gpct) registers are mapped to the
STC registers with a big switch statement. Create a lookup table to handle
the mapping ot the registers. This is easier to maintain.

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_mio_common.c