staging: comedi: usbdux: tidy up usbdux_ao_inttrig()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 25 Jul 2013 23:05:17 +0000 (16:05 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jul 2013 22:09:55 +0000 (15:09 -0700)
commitf994282df674e31574291e2f8cbd986f234d9d91
tree56f312d27ca20e4d636045fda954bb3a0ba67248
parent37c1d1ec37144e9fe14bcc0c3ab0bba92c332312
staging: comedi: usbdux: tidy up usbdux_ao_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 instead if an ao 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