summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi
AgeCommit message (Collapse)AuthorFilesLines
2013-07-03Merge branch 'for-linus' of ↵Linus Torvalds1-3/+0
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull second set of VFS changes from Al Viro: "Assorted f_pos race fixes, making do_splice_direct() safe to call with i_mutex on parent, O_TMPFILE support, Jeff's locks.c series, ->d_hash/->d_compare calling conventions changes from Linus, misc stuff all over the place." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (63 commits) Document ->tmpfile() ext4: ->tmpfile() support vfs: export lseek_execute() to modules lseek_execute() doesn't need an inode passed to it block_dev: switch to fixed_size_llseek() cpqphp_sysfs: switch to fixed_size_llseek() tile-srom: switch to fixed_size_llseek() proc_powerpc: switch to fixed_size_llseek() ubi/cdev: switch to fixed_size_llseek() pci/proc: switch to fixed_size_llseek() isapnp: switch to fixed_size_llseek() lpfc: switch to fixed_size_llseek() locks: give the blocked_hash its own spinlock locks: add a new "lm_owner_key" lock operation locks: turn the blocked_list into a hashtable locks: convert fl_link to a hlist_node locks: avoid taking global lock if possible when waking up blocked waiters locks: protect most of the file_lock handling with i_lock locks: encapsulate the fl_link list handling locks: make "added" in __posix_lock_file a bool ...
2013-06-29comedi: quit wanking with FASYNC in ->release()Al Viro1-3/+0
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-06-24staging: comedi: unioxx5: use comedi_alloc_spriv()H Hartley Sweeten1-7/+3
Use the helper function to allocate the memory and set the subdevice private pointer. This allows the core to automatically free the memory during the detach so the driver doesn't need to deal with it. 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>
2013-06-24staging: comedi: unioxx5: fix unioxx5_detach()H Hartley Sweeten1-6/+7
During the attach of this driver, it's possible for the allocation of the subdevice private data to fail. It's also possible that the io region was not successfully requested. Validate the pointer and iobase before trying to release the region. For aesthetic reasons, rename the local variables. 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>
2013-06-24staging: comedi: pcmuio: fix namespace for all private functionsH Hartley Sweeten1-4/+4
Rename a couple private functions so they have the same namespace as the 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-06-24staging: comedi: pcmuio: return 0 for successful attachH Hartley Sweeten1-1/+1
Returning 0 for success is more common. 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-06-24staging: comedi: pcmuio: remove dev_dbg() noise during attachH Hartley Sweeten1-10/+0
This is just added noise. 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-06-24staging: comedi: pcmuio: use preferred form for passing the size of a structH Hartley Sweeten1-3/+1
As suggested by the CodingStyle. 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-06-24staging: comedi: pcmuio: cleanup remaining #define'sH Hartley Sweeten1-25/+12
Remove all the unused #define's and add namespace to the ones that are used. 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-06-24staging: comedi: pcmuio: cleanup DIO subdevice (*insn_{bits,config})H Hartley Sweeten1-75/+29
Use the pcmuio_{read,write}() helpers to read/write all 24 channels instead of handling the digital I/O as three separate ports. This simplifies both functions with minimal overhead. 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-06-24staging: comedi: pcmuio: introduce pcmuio_read()H Hartley Sweeten1-21/+24
Introduce a helper function to handle reading a 24-bit value from the three 8-bit registers associated with a "port" or "page". Simplify the for() loop in pcmuio_handle_asic_interrupt() that finds which channels have triggered the interrupt. 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-06-24staging: comedi: pcmuio: simplify interrupt subdevice initH Hartley Sweeten1-28/+14
Only subdevices 0 and 2 support interrupts. Simplify the attach 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-06-24staging: comedi: pcmuio: remove 'iobases' from subdevice private dataH Hartley Sweeten1-23/+15
The 'asic' and 'port' associated with a given subdevice can easily be found based on the subdevice 'index'. With that information we can then calculate the correct iobase and register offset needed to read/ write the 8-bit ports. 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-06-24staging: comedi: pcmuio: remove 'iobase' from private dataH Hartley Sweeten1-7/+4
It's simple enough to calculate the iobase when needed. Remove this member from 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-06-24staging: comedi: pcmuio: simplify 'n_subdevs' and 's->n_chan'H Hartley Sweeten1-14/+3
The number of subdevices needed by the driver is based on the 'num_asics' reported by the boardinfo and each subdevice always has 24 channels. Simplify the attach 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-06-24staging: comedi: pcmuio: remove unused boardinfoH Hartley Sweeten1-4/+0
These members of the boardinfo 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-06-24staging: comedi: pcmuio: kzalloc'ed data does not need clearedH Hartley Sweeten1-3/+0
The 'subpriv' pointer is kzalloc'ed 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-06-24staging: comedi: pcmuio: remove 'asic_chan'H Hartley Sweeten1-8/+1
This member of the subdevice private data is always initialize to '0' due to the 'thisasic_chanct' always being zero when it is set during the attach. Simplify the driver a bit by removing 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-06-24staging: comedi: pcmuio: remove 'num_asic_chans'H Hartley Sweeten1-10/+3
This member of the subdevice private data is always initialize to s->n_chan if the subdevice supports interrupts and is only used in functions that can be called by the interrupt subdevice. Simplyfy the driver a bit by removing it and just using s->n_chan. 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-06-24staging: comedi: pcmuio: remove 'first_chan'H Hartley Sweeten1-9/+2
This member of the subdevice private data is always initialize to '0' due to the 'byte_no' always being zero when it is set during the attach. Simplify the driver a bit by removing 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-06-24staging: comedi: pcmuio: remove unused private data variablesH Hartley Sweeten1-8/+0
These members of the private data are either not referenced or are set but never 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-06-24staging: comedi: pcmuio: introduce pcmuio_write()H Hartley Sweeten1-50/+32
Introduce a helper function to handle writing a 24-bit value to the three 8-bit registers associated with a "port" or "page". 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-06-24staging: comedi: pcmuio: tidy up switch_page()H Hartley Sweeten1-15/+1
All the I/O ports are left unlocked in the driver so the 'pagelock' in the private data is not necessary. The paranoia sanity checks are also unnecessary, 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-06-24staging: comedi: pcmuio: tidy up the register map definesH Hartley Sweeten1-65/+42
Add namespace to the register map defines. Gather them together and tidy them up 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-06-24staging: comedi: pcmuio: remove unused {lock,unlock}_port()H Hartley Sweeten1-33/+0
These functions are #ifdef'ed out and not needed in the driver. Just 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-06-24staging: comedi: have comedi_set_spriv() allocate the memoryH Hartley Sweeten6-42/+28
As suggested by Ian Abbott, comedi_set_spriv() can only be used to set the subdevice->private pointer to something that can be kfree()'d. Rename the function to comedi_alloc_spriv() and have it kzalloc() the memory as well as set the private pointer. This saves a function call in the drivers and avoids the possibility of incorrectly calling comedi_set_spriv() for some pointer that is not meant to be kfree()'d. 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-06-19staging: comedi: addi-data: remove unused 'i_NbrTTLChannel' boardinfoH Hartley Sweeten2-18/+1
None of the addi-data drivers that still use the "common" code have ttl digital i/o. Remove the unnecessary boardinfo as well as the subdevice initialization 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-06-19staging: comedi: addi-data: remove unused 'i_Dma' present flagH Hartley Sweeten3-4/+1
None of the addi-data drivers that still use the "common" code support dma. Remove the unnecessaary boardinfo and private data flags. 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-06-19staging: comedi: addi-data: remove unused vars from boardinfoH Hartley Sweeten2-22/+0
Due to the on-going cleanup of the addi-data drivers, the boardinfo used in the "common" code has a number of variables that are not used. Remove the cruft. 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-06-19staging: comedi: addi-data: remove unused defines in addi_common.hH Hartley Sweeten1-5/+0
Due to the on-going cleanup of the addi-data drivers, there are a number of unused defines in addi_common.h. Remove the cruft. 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-06-19staging: comedi: addi-data: simplify the PCI bar readingH Hartley Sweeten2-17/+8
All of the remaining addi-data drivers that use the "common" code either do not have an eeprom or the PCI controller chip is not a PLX PCI 9054. Knowing this we can simplify the common code that reads the PCI bars to get the iobase addresses. 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-06-19staging: comedi: addi-data: remove unused vars from private dataH Hartley Sweeten4-35/+0
Due to the on-going cleanup of the addi-data drivers, the private data used in the "common" code has a number of variables that either are not used at all or or set but never used. Remove all of them from the private data and the unnecessary use in the drivers. 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-06-17staging: comedi: addi_apci_3xxx: only allocate needed subdevicesH Hartley Sweeten1-25/+23
The number of subdevices needed by a given board supported by this driver can cary from 2 (for the apci3500) to a maximum of 5. Currently this driver always allocates 7 subdevices and sets the subdevice type to COMEDI_SUBD_UNUSED for the ones that are not needed. Calculate the actual number of needed subdevices from the boardinfo and only allocate and setup the ones that are used. 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-06-17staging: comedi: addi_apci_3xxx: fix the analog input subdeviceH Hartley Sweeten2-202/+230
The analog input subdevice support functions in hwdrv_apci3xxx.c do not follow the comedi API. The (*insn_config) function overrides the INSN_CONFIG_DIO_INPUT instruction as an internal APCI3XXX_CONFIGURATION instruction. The APCI3XXX_CONFIGURATION instruction requires 4 data parameters but the comedi core sanity checks the INSN_CONFIG_DIO_INPUT instruction which only has 1 data parameter. Because of this the (*insn_config) function can never be called. The (*insn_read) function is supposed to do "one-shot" or "software- triggered" reads and return the data. The function in hwdrv_apci3xxx.c does do this but it also is used to optionally start a "hardware- triggered" conversion. Hardware-triggered conversions should be done with the comedi_async command functions. Delete the hwrdv_apci3xxx.c file and fix the analog input subdevice in the driver by: 1) add a new (*insn_read) function for "one-shot" reads 2) implement the (*do_cmdtest) and (*do_cmd) functions for "hardware-triggered" asyncronous reads 3) fix the interrupt handler to return the read data via the comedi_async 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-06-17staging: comedi: addi_apci_3xxx: stub in analog input command supportH Hartley Sweeten1-2/+26
The analog input subdevice in this driver is broken. The attach of this driver requests the irq and sets the dev->read_subdev to the analog input subdevice but it does not setup the subdevice to support commands. Stub in the command support functions so we can fix the 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-06-17staging: comedi: addi_apci_3xxx: tidy up analog input subdevice initH Hartley Sweeten1-9/+9
For aesthetic reasnons, add some whitespace to the analog input subdevice initialization. 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-06-17staging: comedi: addi_apci_3xxx: remove 'b_SingleDiff' private dataH Hartley Sweeten2-10/+2
The analog reference desired for the acquisition is stored in the insn->chanspec that is passed to the (*insn_read) function. There is no need to use a private data variable to hold the desired analog reference that is set in the (*insn_config). 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-06-17staging: comedi: addi_apci_3xxx: remove 'i_NbrAiChannelDiff' boardinfoH Hartley Sweeten1-34/+9
The number of differential analog input channels is always half the number of single-ended channels, 'ai_n_chan', or all the channels if the board does not support single-ended channels. We can use the 'ai_subdev_flags' boardinfo to determine if the board does not support single-ended channels. To simplify the boardinfo, remove the 'i_NbrAiChannelDiff' and just use 'ai_n_chan' to specify the number of channels. 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-06-17staging: comedi: addi_apci_3xxx: rename 'i_NbrAiChannel'H Hartley Sweeten1-24/+24
Rename this CamelCase boardinfo variable. 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-06-17staging: comedi: addi_apci_3xxx: rename 'ui_MinAcquisitiontimeNs'H Hartley Sweeten2-26/+26
Rename this CamelCase boardinfo variable. 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-06-17staging: comedi: addi_apci_3xxx: clarify 'b_AvailableConvertUnit'H Hartley Sweeten2-32/+41
This boardinfo defines the conversion time bases that the analog input subdevice supports (ns, us, ms). Add some defines to get rid of the magic numbers and clarify the 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-06-17staging: comedi: addi_apci_3xxx: tidy up ↵H Hartley Sweeten1-175/+49
i_APCI3XXX_AnalogInputConfigOperatingMode() The analog input subdevice is broken in this driver. To help fix it, tidy up this (*insn_config) helper function. Rename the CamelCase function and all the CamelCase local variables. Refactor the sanity checks to make the function a bit more concise and remove the printk noise. 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-06-17staging: comedi: addi_apci_3xxx: tidy up i_APCI3XXX_InsnConfigAnalogInput()H Hartley Sweeten2-69/+15
The analog input subdevice is broken in this driver. To help fix it, tidy up this (*insn_config) function. Rename the CamelCase function. Move the (insn->n == 4) test from i_APCI3XXX_AnalogInputConfigOperatingMode() to this function. Make the function a bit more concise and remove the printk noise. 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-06-17staging: comedi: addi_apci_3xxx: properly set the analog input subdev_flagsH Hartley Sweeten1-2/+26
Some of the boards supported by this driver only have differential analog inputs. Add a new boardinfo, 'ai_subdev_flags', to allow properly setting the subdev_flags for 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-06-17staging: comedi: addi_apci_3xxx: rename boardinfo 'i_AiMaxData'H Hartley Sweeten1-26/+26
Rename this CamelCase boardinfo. Also, change its type to match the type of comedi_subdevice 'maxdata'. For aesthetic reasons, change the values to hex since this is more common for the 'maxdata' values in comedi drivers. 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-06-17staging: comedi: addi_apci_3xxx: rename boardinfo 'pc_DriverName'H Hartley Sweeten1-27/+27
Rename this CamelCase 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-06-17staging: comedi: addi_apci_3xxx: remove 'i_AiChannelList' from the boardinfoH Hartley Sweeten1-26/+1
The analog input s->len_chanlist for the boards supported by this driver should always be the number of channels (s->n_chan). Use that instead and remove the 'i_AiChannelList' 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-06-17staging: comedi: addi_apci_3xxx: remove 'tsk_Current' from private dataH Hartley Sweeten1-4/+1
The interrupt function should be using comedi_event() to let the user know data is available from the analog input subdevice. The analog input subdevice is currently broken and nothing sets tsk_Current anyway so just 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-06-17staging: comedi: addi_apci_3xxx: rename 'dw_AiBase' in private dataH Hartley Sweeten2-30/+30
This variable holds the ioremap'ed PCI bar 3 used to read/write the analog input and output registers. Rename it to simply 'mmio'. 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-06-17staging: comedi: addi_apci_3xxx: remove 'iobase' from private dataH Hartley Sweeten1-18/+10
The private data 'iobase' is the same as the comedi_device 'iobase'. Use the one in the comedi_device instead. 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>