]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: ni_tio: fix ni_tio_insn_read()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 24 Jul 2014 17:14:26 +0000 (10:14 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 27 Jul 2014 18:16:46 +0000 (11:16 -0700)
commit231331e104a932913b7331fe3bd744f3e0a7c1ec
tree8d6a21a3eaf092cc384aef694deaccc89bcbfd56
parentf739b38ca7db6fa8cf8f4f830a49bfe761b8133b
staging: comedi: ni_tio: fix ni_tio_insn_read()

The comedi core expects the (*insn_read) operations to read insn->n
values and return the number of values read.

Fix this function to work line the core expects.

For aesthetics, factor out the code that reads the SM_Save_Reg.

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