summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi
AgeCommit message (Collapse)Author
2013-08-01staging: comedi: das16: remove 'i8254_offset' from boardinfoH Hartley Sweeten
All the boards supported by this driver have an 8254 timer at offset 0x0c. Remove this unused information from the boardinfo. 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>
2013-08-01staging: comedi: das16: move boardinfo declarationH Hartley Sweeten
Now that the boardinfo does not require any forward declarations, move it near the definition of the struct. 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>
2013-08-01staging: comedi: das16: remove unnecessary test in das16_interrupt()H Hartley Sweeten
The timer is only started by the ai subdevice in das16_cmd_exec() and this function can only be called if the device is attached. Remove the unnecessary sanity check. 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>
2013-08-01staging: comedi: das16: move some functions to improve readabilityH Hartley Sweeten
For aesthetics, move some of the functions to make the code easier to follow. 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>
2013-08-01staging: comedi: das16: tidy up das16_ai_insn_read()H Hartley Sweeten
Factor out the loop that waits for the ai conversion to complete. Tidy up the function a bit. 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>
2013-08-01staging: comedi: das16: introduce das16_ai_{en, dis}able() helpersH Hartley Sweeten
Introduce a couple helper functions to enable and disable the analog input interrupt/dma conversions. 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>
2013-08-01staging: comedi: das16: remove the register map commentsH Hartley Sweeten
This is just extra cruft. Remove it. 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>
2013-08-01staging: comedi: das16: remove unused static const variableH Hartley Sweeten
This variable is not used in the driver. Remove it. 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>
2013-08-01staging: comedi: das16: remove unused DAS16_SIZEH Hartley Sweeten
This define is not used in the driver. Remove it. 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>
2013-08-01staging: comedi: das16: add a 'can_burst' flag to the private dataH Hartley Sweeten
If the boardinfo 'size' is > 0x400 it indicates that the board has additional registers that allow bursting of analog input data. To better indicate this add a flag to the private data. 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>
2013-08-01staging: comedi: das16: remove 'volatile' on private data variablesH Hartley Sweeten
As indicated by checkpatch.pl, "WARNING: Use of volatile is usually wrong: ...". The variables in the private data that are marked volatile don't need to be. Remove the volatile. 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>
2013-08-01staging: comedi: das16: remove DEBUG_PRINT macroH Hartley Sweeten
This macro outputs some printk() debug info that is just added noise. Remove it as well as the DEBUG stuff. 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>
2013-08-01staging: comedi: das16: remove reg_dump()H Hartley Sweeten
This function just prints some development debug information. There is no reason to leave this in the final driver. 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>
2013-08-01staging: comedi: das16: remove 'ai_unipolar' and 'ai_singleended'H Hartley Sweeten
These members in the private data are only used during the board attach. Move the reading of the status register to the board attach and just check the value where needed when initializing the analog input subdevice. 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>
2013-08-01staging: comedi: das16: remove unused struct definitionH Hartley Sweeten
This struct is not used by the driver. Remove it. 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>
2013-08-01staging: comedi: das16: tidy up the comedi_lrange tablesH Hartley Sweeten
Cleanup the whitespace in the tables. 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>
2013-08-01staging: comedi: das16: cleanup analog output subdeviceH Hartley Sweeten
All the boards supported by this driver that have analog outputs use the same function to handle the (*insn_write) for the subdevice. They all also have 12-bit resolution (maxdata = 0x0fff). Remove the 'ao' and 'ao_nbits' members from the boardinfo and replace them with a simple bit-field flag 'has_ao'. Tidy up the subdevice init a bit as well as the (*insn_write) function. 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>
2013-08-01staging: comedi: das16: all supported board have digital outputsH Hartley Sweeten
All the boards supported by this driver have digital outputs and all of then use the same function to handle the (*insn_bits) for the subdevice. Remove the 'do_' member from the boardinfo and always initialize the digital output subdevice during the board attach. Tidy up the subdevice init a bit as well as the (*insn_bits) function. Remove SDF_READABLE from the subdev_flags. This is a pure digital output subdevice and the outputs are not readable. 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>
2013-08-01staging: comedi: das16: all supported board have digital inputsH Hartley Sweeten
All the boards supported by this driver have digital inputs and all of then use the same function to handle the (*insn_bits) for the subdevice. Remove the 'di' member from the boardinfo and always initialize the digital input subdevice during the board attach. Tidy up the subdevice init a bit as well as the (*insn_bits) function. The (*insn_bits) function does not need to clear data[0]. 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>
2013-08-01staging: comedi: das16: change boardinfo 'ai_nbits' to 'ai_maxdata'H Hartley Sweeten
The subdevice functions that used this boardinfo can use the subdevice 's->maxdata' value instead. Tidy up those functions. Change the boardinfo so that the calculation is not needed during the attach. 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>
2013-08-01staging: comedi: das16: all supported board have analog inputsH Hartley Sweeten
All the boards supported by this driver have analog inputs and all of then use the same function to handle the (*insn_read) for the subdevice. Remove the 'ai' member from the boardinfo and always initalize the analog input subdevice during the board attach. Tidy up the subdevice init a bit. 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>
2013-08-01staging: comedi: das16: fix DMA init during board attachH Hartley Sweeten
DMA support is optional in this driver. To enable it, the user passes the desired DMA channel during the board attach. A timer is then used by the driver to periodically get the analog input data from the DMA. Since the DMA support is optional, modify the init code so that it only fails if the DMA channel is unavailable or the DMA buffers can not be allocated. Don't fail just because the user passed an invalid DMA channel (only DMA channels 1 and 3 are valid). Remove the printk() noise about the DMA. Change the printk() when the request_dma() fails into a dev_err(). Move the timer initialization so it's only setup if DMA is available. It's not needed otherwise. Also, only hook up the subdevice command support functions if DMA is available. This allows removing a couple sanity checks in the command support. 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>
2013-08-01staging: comedi: das16: remove DMA irq supportH Hartley Sweeten
As noted in the driver, a timer is always used by this driver to handle the DMA because samples could be dropped while waiting for the DMA done interrupt. Remove the irq setup code as well as the interrupt handler. 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>
2013-08-01staging: comedi: das16: "timer_mode" is always used for DMAH Hartley Sweeten
As noted in the driver, a timer is always used by this driver to handle the DMA due to buggy DMA controllers and the lack of a hardware fifo in some of the supported boards. Remove all the non-timer mode specific code. 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>
2013-07-29staging: comedi: dt9812: remove duplicated include from dt9812.cWei Yongjun
Remove duplicated include. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-29Merge 3.11-rc3 into staging-nextGreg Kroah-Hartman
We want these fixes here. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-26staging: comedi: usbdux: consolidate usbduxsub_unlink_{in, out}urbs()H Hartley Sweeten
These functions are identical other than the which and how many urbs are unlinked. Consolidate the functions into one usbdux_unlink_urbs() function. 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>
2013-07-26staging: comedi: usbdux: move and rename the bulk transfer commandsH Hartley Sweeten
For aesthetic reasons, move the defines used for the bulk transfer commands out of the middle of the code and rename them so they are a bit more readable. 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>
2013-07-26staging: comedi: usbdux: remove unused defineH Hartley Sweeten
This define is not used, and it's actually incorrect. The usbdux device only has 4 analog output channels. Remove it. 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>
2013-07-26staging: comedi: usbdux: 'dac_commands' does not need to be kzalloc()'dH Hartley Sweeten
The 'dac_commands' buffer is used to pass the ao channel list from usbdux_ao_cmd() to the urb callback, usbduxsub_ao_isoc_irq(). This buffer does not need to be allocated. Change it into a simple array of the correct size. Rename the variable to 'ao_chanlist' to clarify what it actually is. 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>
2013-07-26staging: comedi: usbdux: remove unnecessary check in usbdux_ao_cmd()H Hartley Sweeten
This check is not necessary. The cmd->chanlist_len will always be less than or equal to the subdevice len_chanlist that was setup during the attach of the device. 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>
2013-07-26staging: comedi: usbdux: remove unnecessary check in usbdux_ai_cmd()H Hartley Sweeten
This check is not necessary. The cmd->chanlist_len will always be less than or equal to the subdevice len_chanlist that was setup during the attach of the device. 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>
2013-07-26staging: comedi: usbdux: simplify initializing the ao urb transfer_bufferH Hartley Sweeten
Remove the ugly casting of datap to the ao urb->transfer_buffer. The format of the data in the buffer is simply. [0] = # of channels to update (s->async->cmd.chanlist.len) [1] = lsb of value for 1st channel to update [2] = msb of value for 1st channel to update [3] = 1st channel to update (depvriv->dac_commands[0]) If more than 1 channel is to be updated they are simply added to the buffer: [4] = lsb of value for 2st channel to update [5] = msb of value for 2st channel to update [6] = 1st channel to update (depvriv->dac_commands[1]) etc. 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>
2013-07-26staging: comedi: usbdux: cleanup the private data 'outBuffer'H Hartley Sweeten
This buffer is used to cache the values that are written to the analog output channels. Currently it only caches the single writes to the channels using the (*insn_write) callback. The async command writes are not cached. The buffer is also being kzalloc'ed during the attach of the driver to a size much larger that required. Rename the CamelCase buffer and change it to an array in the private data of the correct size to cache the analog output channel values. Modify the analog output urb callback so it updates the cached values with those used for the asynchronous command to allow readback after the command completes. The sanity check of the index to dac_commands[] (i.e. the 'chan' being written) is not needed. The chanlist_len will always be less than the number of channels. Also, fix the dev_err() message so it uses the proper device pointer. 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>
2013-07-26staging: comedi: usbdux: rename private data variablesH Hartley Sweeten
The usbdux and usbduxsigma drivers are _very_ similar. For aesthetic reasons, rename the private data variables in this driver to match the names in the usbduxsigma driver so we can start sharing the common code. 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>
2013-07-26staging: comedi: usbdux: clarify bipolar ai data in usbduxsub_ai_isoc_irq()H Hartley Sweeten
Use the comedi_range_is_bipolar() helper instead of checking the 'range' index against a magic number. Also, use the s->maxdata to calculate the value needed to munge the value for bipolar data instead of the magic number. 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>
2013-07-26staging: comedi: usbdux: move usbdux_firmware_upload()H Hartley Sweeten
For aesthetics, move this function closer to the (*auto_attach). Also, rename some of the defined constants that are used by the firmware upload. 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>
2013-07-26staging: comedi: usbdux: remove some unused definesH Hartley Sweeten
These defines are not used by the driver. Remove them. 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>
2013-07-26staging: comedi: usbdux: remove the usb endpoint definesH Hartley Sweeten
The endpoint defines are each only used in one place and don't help clarify the code. Remove the defines and just open code the values. 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>
2013-07-26staging: comedi: usbdux: use the stop helpers in the detachH Hartley Sweeten
Use the stop helpers instead of duplicating the code in the detach. 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>
2013-07-26staging: comedi: usbdux: tidy up unlink and stop helpersH Hartley Sweeten
For aesthetic reasons, pass the comedi_device pointer to the unlink helpers instead of the private data pointer. All the unlink helpers simply call usb_kill_urb() to cancel any pending transfer requests. The usb passed to usb_kill_urb() can be NULL so the extra sanity check is not required. The unlink helpers will always return success so just make them void functions. Since the stop helpers will also always return success, make them void functions as well. 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>
2013-07-26staging: comedi: usbdux: fix usbdux_pwm_start()H Hartley Sweeten
Add the missing down/up of the semaphore to prevent other commands from being issued to the usb device while the pwn is being stopped. Rename the local variable used for the private data pointer to the comedi "norm". Use memset() to initialize the urb transfer buffer. 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>
2013-07-26staging: comedi: usbdux: fix usbdux_pwm_cancel()H Hartley Sweeten
Add the missing down/up of the semaphore to prevent other commands from being issued to the usb device while the pwn is being stopped. Rename the local variable used for the private data pointer to the comedi "norm". Make sure to check that usbdux_pwm_stop() was successful before sending command to the usb device to stop the pwm. 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>
2013-07-26staging: comedi: usbdux: tidy up usbdux_pwm_stop()H Hartley Sweeten
For aesthetic reasons, pass the comedi_device pointer to this function instead of the private data pointer. 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. 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>
2013-07-26staging: comedi: usbdux: fix usbdux_counter_write()H Hartley Sweeten
Comedi (*insn_write) operations are supposed to write insn->n values. Fix this function to work like the core expects. 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. 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>
2013-07-26staging: comedi: usbdux: fix usbdux_counter_read()H Hartley Sweeten
Comedi (*insn_read) operations are supposed to read and return insn->n values. Fix this function to work like the core expects. 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. 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>
2013-07-26staging: comedi: usbdux: tidy up usbdux_dio_insn_bits()H Hartley Sweeten
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. 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>
2013-07-26staging: comedi: usbdux: tidy up usbdux_dio_insn_config()H Hartley Sweeten
Tidy up this function a bit. 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>
2013-07-26staging: comedi: usbdux: tidy up usbdux_ao_cmd()H Hartley Sweeten
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. Make sure an ao command is not already running and return -EBUSY. Tidy up the exit path using goto to ensure that the semaphore is released. 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>
2013-07-26staging: comedi: usbdux: tidy up usbdux_ao_inttrig()H Hartley Sweeten
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>