]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: ni_stc.h: add read/write callbacks to struct ni_private
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 29 May 2014 17:56:32 +0000 (10:56 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jun 2014 21:56:45 +0000 (14:56 -0700)
commit6f9245c04d78d8c12f9908df12a4163a8b178ce8
tree35dab4ac9042f21f091f59a9ab5954f67a3e9f63
parent0215f56984a4a44955abbb519188e723ce7044e0
staging: comedi: ni_stc.h: add read/write callbacks to struct ni_private

The {read,write}[bwl] macros used to access the registers in the ni_atmio,
ni_mio_cs, and ni_pcimio drivers and the included ni_mio_common.c file all
rely on a local variable having a specific name. They also require some of
the ni_mio_common code to need a __maybe_unused tag on the devpriv local
variable.

Remove all the macros by converting them into private functions and storing
the callbacks in the private data.

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_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