mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-14 05:55:17 +00:00
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>
This commit is contained in:
parent
17fdeba076
commit
dabf2aa354
1 changed files with 22 additions and 29 deletions
Loading…
Add table
Add a link
Reference in a new issue