]> git.karo-electronics.de Git - karo-tx-linux.git/commit
staging: comedi: usbduxfast: tidy up usbduxfast_ai_insn_read()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 14 May 2013 20:41:51 +0000 (13:41 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 May 2013 23:24:31 +0000 (16:24 -0700)
commitdabf2aa3546aa662cd2624d6308e07454689e91d
tree7594b62b66562d1d404c8b8ae6304d6a2afd7991
parent17fdeba07662e68bf3d9a7270292f0fef9c9fe2d
staging: comedi: usbduxfast: tidy up usbduxfast_ai_insn_read()

Remove the sanity check of devpriv, this function can only be called
by the comedi core if the private data is allocated.

Get the 'chan', 'range' and 'rngmask' from the function parameters
when the local variables are declared.

For aesthetic reasons, rename the local variable 'err' to 'ret'
since that name is more standard.

(*insn_read) functions are supposed to return the number of values
read or an error code. Change the final return to 'insn->n' to make
it 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/usbduxfast.c