]> rtime.felk.cvut.cz Git - linux-imx.git/commit
staging: comedi: pcmad: tidy up pcmad_ai_insn_read()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 5 Jun 2013 22:37:06 +0000 (15:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Jun 2013 19:01:34 +0000 (12:01 -0700)
commit3275b4d3db1f087c67fa115b150a9d2f9d8429f9
treedb3c036d378abc634c9b02a329585fc32190b366
parenta0e82af4c5703138b21e417440ffc937b671db1e
staging: comedi: pcmad: tidy up pcmad_ai_insn_read()

Use a local variable to read and munge the analog input data instead
of directly using the 'data' pointer passed to the function.

(*insn_read) functions either return an errno or the number of data
values read. Change the final return to insn->n to make this clearer.

Tidy up the function.

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