OSDN Git Service

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)
commit27c4d23cb070fd83f5705aabfad8d277fed9e022
tree8d6a21a3eaf092cc384aef694deaccc89bcbfd56
parente96caf368c043353e6c30d2877677a88c0b25c85
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