Skip to content
Commit dabf2aa3 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 17fdeba0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment