staging: comedi: usbduxsigma: tidy up usbdux_ai_insn_read()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 23 May 2013 20:05:19 +0000 (13:05 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 May 2013 11:41:07 +0000 (20:41 +0900)
commitc5db3b755ccf6bf046b5b5fa1b94cee1cf609bd8
treeb5b3f86149f90e26705614262491099460552038
parent44d3fcaece73f8a60369cb609f4b81a2270c8e0c
staging: comedi: usbduxsigma: tidy up usbdux_ai_insn_read()

Rename the function so it has namespace associated with the driver.
Rename the local variable used for the private data pointer.

Return -EBUSY if an asynchronous command is running and the read cannot
be completed.

Propagate the errno if the receive_dux_command() fails.

Tidy up the function to make it more concise.

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