staging: comedi: ni_stc.h: remove stc read/write callbacks from ni_private
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 19 Jun 2014 17:20:37 +0000 (10:20 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jun 2014 20:11:33 +0000 (13:11 -0700)
commitb30f0d0caa1ffc1051c82cfb42014e084b6ac4c3
treea7eb1dce1f5a076020c70e15ea53edc56f0544fa
parentac63baf5517cb7c22d63e2c5d269994f3002c7e0
staging: comedi: ni_stc.h: remove stc read/write callbacks from ni_private

The drivers that include ni_mio_common.c set the stc register read/write
callbacks to private functions that handle the read/write operations in
the correct manner for the hardware.

The ni_atmio and ni_mio_cs drivers use identical code to handle the
operations.

The ni_pcimio driver is a bit different due to the non-windowed setup
of the stc registers on the m series boards. For the other boards
supported by the ni_pcimio driver, the direct access of the first 8
STC registers is also disabled due to a difference on the 611x devices.

These differences can all be handled in the ni_stc_{read,write}[lw]()
helpers. Refactor the helpers and remove the callbacks from the private
data.

Also, move the helper functions the handle the mapping of the windowed
STC register offsets to M series register offset from ni_pcimio.c to
ni_mio_common.c.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/ni_atmio.c
drivers/staging/comedi/drivers/ni_mio_common.c
drivers/staging/comedi/drivers/ni_mio_cs.c
drivers/staging/comedi/drivers/ni_pcimio.c
drivers/staging/comedi/drivers/ni_stc.h