OSDN Git Service

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

The drivers that include ni_mio_common.c set the 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 ioport register access and the ni_pcimio driver uses memory mapped
register access. The memory mapped base address is stored in the 'mite'
pointer in the private data which is only allocated and initialized by
the ni_pcimio driver.

Detect the need for memory mapped register access by checking if the
'mite' pointer is set in the private data and remove the callbacks
from the private data.

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