staging: comedi: usbdux: tidy up usbdux_ai_inttrig()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 25 Jul 2013 23:03:15 +0000 (16:03 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jul 2013 22:09:54 +0000 (15:09 -0700)
commite5cb2f9498e0a5b4c7f882a21dbba8f8ba351819
treeec911be26df63e3b1f5a64fe63b16aadb93164a5
parent9c922a9076afd9e483bc17d768ed813d2f76f7cb
staging: comedi: usbdux: tidy up usbdux_ai_inttrig()

Rename the local variable used for the private data pointer to the
comedi "norm".

Remove the unnecessary sanity check of the private data pointer. This
function can only be called is the private data was allocated during
the attach.

Tidy up the exit path using goto to ensure that the semaphore is
released.

Return -EBUSY if an ai command is already running.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/usbdux.c