]> git.karo-electronics.de Git - linux-beck.git/commit
staging: comedi: dt9812: cleanup analog in subdevice (*insn_read)
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 14 May 2013 21:33:09 +0000 (14:33 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 May 2013 23:26:02 +0000 (16:26 -0700)
commit83a69f5adb81b3432fb1e58485639c391cc65f17
tree27cf5530ecf387704d8aa4824ce4707213836e42
parent36c973d0896a5319cf3089c20e8d9881bc60297e
staging: comedi: dt9812: cleanup analog in subdevice (*insn_read)

For aesthetic reasons, rename the function to help with grepping and
rename some of the local vars.

dt9812_analog_in() can fail. Make sure to check for any failure and
return the errno.

The comedi core expects the (*insn_read) functions to return either
an errno or the number of samples read. Change the final return to
insn->n to make this clearer.

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/dt9812.c