summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi
AgeCommit message (Collapse)Author
2016-05-21Merge tag 'staging-4.7-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging and IIO driver updates from Greg KH: "Here's the big staging and iio driver update for 4.7-rc1. I think we almost broke even with this release, only adding a few more lines than we removed, which isn't bad overall given that there's a bunch of new iio drivers added. The Lustre developers seem to have woken up from their sleep and have been doing a great job in cleaning up the code and pruning unused or old cruft, the filesystem is almost readable :) Other than that, just a lot of basic coding style cleanups in the churn. All have been in linux-next for a while with no reported issues" * tag 'staging-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (938 commits) Staging: emxx_udc: emxx_udc: fixed coding style issue staging/gdm724x: fix "alignment should match open parenthesis" issues staging/gdm724x: Fix avoid CamelCase staging: unisys: rename misleading var ii with frag staging: unisys: visorhba: switch success handling to error handling staging: unisys: visorhba: main path needs to flow down the left margin staging: unisys: visorinput: handle_locking_key() simplifications staging: unisys: visorhba: fail gracefully for thread creation failures staging: unisys: visornic: comment restructuring and removing bad diction staging: unisys: fix format string %Lx to %llx for u64 staging: unisys: remove unused struct members staging: unisys: visorchannel: correct variable misspelling staging: unisys: visorhba: replace functionlike macro with function staging: dgnc: Need to check for NULL of ch staging: dgnc: remove redundant condition check staging: dgnc: fix 'line over 80 characters' staging: dgnc: clean up the dgnc_get_modem_info() staging: lustre: lnet: enable configuration per NI interface staging: lustre: o2iblnd: properly set ibr_why staging: lustre: o2iblnd: remove last of kiblnd_tunables_fini ...
2016-05-20scripts/spelling.txt: add "fimware" misspellingKees Cook
A few instances of "fimware" instead of "firmware" were found. Fix these and add it to the spelling.txt file. Signed-off-by: Kees Cook <keescook@chromium.org> Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-05-03staging: comedi: mite: tidy up module init/exitH Hartley Sweeten
Move the module_init()/module_exit() so they are in the prefered spot on the line after the 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>
2016-05-03staging: comedi: mite: document the remaining exported functionsH Hartley Sweeten
For aesthetics, add docbook comments for the exported functions. 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>
2016-05-03staging: comedi: mite: move the mite dma arm/disarm/reset functionsH Hartley Sweeten
For aesthetics, move these functions to a more logical spot in the code and add docbook comments for the exported functions. 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>
2016-05-03staging: comedi: mite: move mite_prep_dma()H Hartley Sweeten
For aesthetics, move this functions to a more logical spot in the code and add a docbook comment for the exported 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>
2016-05-03staging: comedi: mite: tidy up mite dma channel request/releaseH Hartley Sweeten
For aesthetics, make the actual "request" function static and change mite_request_channel_in_range() into a wrapper that calls the internal function. Change the inline function that requests any free channel into an export that also calls the internal function. Move the functions to a more logical spot in the code and add docbook comments for the exported functions. 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>
2016-05-03staging: comedi: mite: move the mite ring functionsH Hartley Sweeten
For aesthetics, move the functions that allocate/free and initialize the mite dma ring. They are currently kind of scattered around the code. Add docbook comments for the exported functions. 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>
2016-05-03staging: comedi: mite: tidy up kernel messages in mite_steup()H Hartley Sweeten
The dev_err() messages with pci_ioremap_bar() fails are just noise. Remove them. The 'use_win1' and 'fifo_size' dev_info() messages are also noise but they may be useful when debugging. Change them to dev_dbg(). Absorb dump_chip_signnature() and change the pr_info() messages to dev_dbg(). These also might be useful when debugging. 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>
2016-05-03staging: comedi: mite: do mite_steup() as part of mite_attach()H Hartley Sweeten
Currently all the drivers that use the mite driver have to call mite_setup() after allocating and initializing the mite device with mite_attach(). Move the mite_setup() call into mite_attach() to simplify the drivers a bit and remove the need for the additional inline and exported functions. For aesthetics, move mite_setup2(), and rename it to mite_setup(), so it's near mite_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>
2016-05-03staging: comedi: mite: document mite_alloc()/mite_detach()H Hartley Sweeten
These functions are basically the comedi_driver (*attach)/(*detach) for this driver. For aesthetics, rename mite_alloc() to mite_attach() and pass the comedi_device pointer to it instead of the pci_dev pointer. Move the functions to the end of the file. This is typically where a comedi_drivers (*attach)/(*detach) are located. Add some docbook comments for these exported functions. 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>
2016-05-03staging: comedi: mite: use prefered form for passing a struct sizeH Hartley Sweeten
Add a local variable to mite_buf_change() so that the prefered form of passing a struct size, sizeof(*p), can be 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>
2016-05-03staging: comedi: mite: introduce mite_free_dma_descs()H Hartley Sweeten
Introduce a helper function to handle the dma_free_coherent() of the mite dma descriptors. 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>
2016-05-03staging: comedi: mite: remove mite member 'channel_allocated'H Hartley Sweeten
An allocated mite_channel will have its 'ring' member initialized to point to the mite_ring that will be used for DMA. A non-allocated mite_channel will have a 'ring' member set to NULL, either by a channel release or due to the initial kzalloc of the 'mite' struct. Refactor the code to use the mite_chan->ring to detect in a channel is allocated and remove the unnecessary member. 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>
2016-05-03staging: comedi: mite: rename mite member 'mite_io_addr'H Hartley Sweeten
Rename this member of struct mite to 'mmio' to help shorten the long lines. Add a local variable for the mite pointer in the ni_pcimio driver to clarify and shorten the long lines. 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>
2016-05-03staging: comedi: mite: tidy up mite_init_ring_descriptors()H Hartley Sweeten
Use a local variable for the mite_dma_desc pointer to help clarify this 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>
2016-05-03staging: comedi: mite: rename mite_ring member 'descriptors'H Hartley Sweeten
Rename this member of struct mite_ring to 'descs' to help shorten the long lines. 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>
2016-05-03staging: comedi: mite: rename mite_ring member 'descriptors_dma_addr'H Hartley Sweeten
Rename this member of struct mite_ring to 'dma_addr' to help shorten the long lines. 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>
2016-05-03staging: comedi: mite: rename 'struct mite_dma_descriptor_ring'H Hartley Sweeten
Rename this name to 'mite_ring' to help shorten the long lines. In the ni_660x driver, also shorten the private data member 'mite_rings' to simply 'ring'. 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>
2016-05-03staging: comedi: mite: rename 'struct mite_dma_descriptor'H Hartley Sweeten
Rename this struct to 'mite_dma_desc' to help shorten the long lines. 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>
2016-05-03staging: comedi: mite: rename 'struct mite_struct'H Hartley Sweeten
Rename this struct to simply 'mite'. The current name is a bit redundant. 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>
2016-04-29staging: comedi: mite: don't expose CHSR_* bit definesH Hartley Sweeten
These bit defines are only used in the mite driver. Move them so they are not needlessly exposed. 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>
2016-04-29staging: comedi: mite: return void from mite_ack_linkc()H Hartley Sweeten
Currently this function returns the value read from the mite channel status register. None of the callers use, or need, the returned value. For aesthetics, change the return to void. 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>
2016-04-29staging: comedi: mite: make mite_ack_linkc() handle mite_sync_dma()H Hartley Sweeten
The mite dma is always synced on a LINKC status. Some of the mite users sync the dma regadless of the status. Add a 'sync' parameter to mite_ack_linkc() to force a dma sync. Then do the dma sync as needed. 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>
2016-04-29staging: comedi: ni_mio_common: handle_a_interrupt() does not need ↵H Hartley Sweeten
ai_mite_status This function only handles the analog input interrupts, the dma was already handled. Remove the unecessary parameter and fix ni_E_interrupts() so that the comedi events are properly handled. 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>
2016-04-29staging: comedi: ni_mio_common: simplify AI LINKC handlingH Hartley Sweeten
Simplfy the LINKC handing for the analog input dma by moving it into the main interrupt handler. This function already hold the spinlock mite_channel_lock so call mite_sync_dma() directly instead of using the helper 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>
2016-04-29staging: comedi: ni_mio_common: fix interrupt handler for dev->read_subdevH Hartley Sweeten
There may not be a dev->read_subdev, i.e. an analog input subdevice, that supports async commands. If it doesn't exist the interrupt/dma will never be enabled. Fix ni_E_interrupt() so that the analog input subdevice is only handled if it exists. This also fixes minor NULL dereference issue in handle_a_interrupt(). If the dev->read_subdev is NULL the comedi_async pointer (s->async) will not be allocated by the device postconfig so there is no way to get a valid comedi_cmd (&s->async->cmd). 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>
2016-04-29staging: comedi: ni_mio_common: handle_b_interrupt() does not need ↵H Hartley Sweeten
ao_mite_status This function only handles the analog input interrupts, the dma was already handled. Remove the unecessary parameter and fix ni_E_interrupts() so that the comedi events are properly handled. 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>
2016-04-29staging: comedi: ni_mio_common: fix interrupt handler for dev->write_subdevH Hartley Sweeten
There may not be a dev->write_subdev, i.e. an analog output subdevice, that supports async commands. If it doesn't exist the interrupt/dma will never be enabled. Fix ni_E_interrupt() so that the analog output subdevice is only handled if it exists. 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>
2016-04-29staging: comedi: ni_mio_common: absorb mite_handle_b_linkc()H Hartley Sweeten
Simplfy the LINKC handing by removing the helper function and moving the mite_sync_dma() into the main 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>
2016-04-29staging: comedi: mite: check for transfer errors in mite_ack_linkc()H Hartley Sweeten
Currently only some of the users of mite dma check for transfer errors. The ni_mio_common code does the check for the analog input and analog output subdevices. The m-series digital I/O subdevice and the counter subdevices (handled by ni_tiocmd) do not check. The ni_pcidio driver checks for the digital input subdevice. The ni_660x driver counter subdevices (handled by ni_tiocmd) also do not check. Move the transfer error checking into mite_ack_linkc() so that the drivers that use mite don't have to deal with it. This also makes sure that all the subdevices that use mite for dma will cancel the async command if a transfer error is detected. Simplfy the transfer error check by just checking the CHSR_XFERR bit. This bit will be set if one or more transfer processes terminated with an error. The actual error is determined by the LERR, MERR, and DERR bits. 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>
2016-04-29staging: comedi: mite: cleanup remaining mite register/bitsH Hartley Sweeten
For aesthetics, convert the register/bit enums into defines and use the BIT() macro to define the bits. 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>
2016-04-29staging: comedi: mite: remove BUG_ON() in MITE_IODWBSR_1_WSIZE_bits()H Hartley Sweeten
Prior to calling this function pci_ioremap_bar() is called. If the pci_resource_len(), i.e. the 'size', was 0 the ioremap would fail so this function would never be called. So the first BUG_ON() can never occur. The 'order' returned by ilog2() will always be > 0 so the second BUG_ON() will also never occur. Remove the unnecessary BUG_ON() checks and tidy up the 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>
2016-04-29staging: comedi: mite: document the mite_struct spinlock_tH Hartley Sweeten
Add a comment to fix the checkpatch.pl issue: CHECK: spinlock_t definition without comment 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>
2016-04-29staging: comedi: mite: rename CamelCase CHSR bit enumsH Hartley Sweeten
Rename the CamelCase symbols to fix the checkpatch.pl issues. 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>
2016-04-29staging: comedi: mite: introduce mite_sync_dma()H Hartley Sweeten
The struct mite_channel 'dir' member specifies if the dma is input or output. Wrap the mite_sync_input_dma() and mite_sync_output_dma() functions with a single mite_sync_dma() so that the drivers don't have to worry about the sync direction. The functions that actually sync the input/output dma currently return -1 if an overflow/underrun is detected otherwise they return 0. If an overflow/underrun is detected the async->event COMEDI_CB_OVERFLOW is also set. The callers never check the return value anyway so just make the functions return void. The async->event can be checked if necessary to detect any errors. 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>
2016-04-29staging: comedi: mite: don't expose unnecessary register/bit infoH Hartley Sweeten
Most of the mite registers are only accessed by the mite driver. There is no reason to expose the register/bit info. Remove this info from the header. For aesthetics, convert the bit info enums into defines and use the BIT() macro to define them. Tidy up the inline functions for the retry limit and drq reqs bits in the config registers. 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>
2016-04-29staging: comedi: mite: introduce mite_ack_linkc()H Hartley Sweeten
Introduce a helper function to handle the ack of a LINKC interrupt. Tidy up the drivers that use the new helper. The extra check for CHSR_INT in the ni_pcidio driver is not necessary. This bit will be set if any of the interrupt sources, including CHSR_LINKC, have generated an interrupt. Remove the extra check. The mite_get_status() function is now only used by the mite driver. Make it static and remove the export. 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>
2016-04-29staging: comedi: mite: don't expose mite_dma_reset()H Hartley Sweeten
This function is only called by the mite driver. Remove the inline function from the header and make it static in the driver. Use the function in mite_prep_dma() instead of duplicating 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>
2016-04-29staging: comedi: ni_pcidio: remove redundant mite disarm/resetH Hartley Sweeten
The mite_release_channel() will disarm and reset the mite channel. Remove the redundant calls in ni_pcidio_release_di_mite_channel(). 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>
2016-04-29staging: comedi: mite: remove mite_struct member 'daq_phys_addr'H Hartley Sweeten
This member of mite_struct is only used to map the mite I/O window. For aesthetics, remove it and use a local variable 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>
2016-04-29staging: comedi: mite: remove mite_struct member 'mite_phys_addr'H Hartley Sweeten
This member of mite_struct is set but never used. 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>
2016-04-29staging: comedi: mite: don't export internal functionsH Hartley Sweeten
The functions that get the number of bytes written to and read from memory are only used internally by the mite driver when syncing the dma channel. Make them static and remove the exports. 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>
2016-04-29staging: comedi: mite: remove mite_dma_tcr()H Hartley Sweeten
This exported function is not used by any of the comedi drivers. The only call point in mite.c is commented out. Remove the unused function and the export. 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>
2016-04-29staging: comedi: mite: remove TOP_OF_PAGE() macroH Hartley Sweeten
This macro is not used. 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>
2016-04-29staging: comedi: mite: Prefer 'unsigned int' to bare use of 'unsigned'H Hartley Sweeten
Fix the checkpatch.pl issues. 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>
2016-04-29staging: comedi: ni_mio_common: introduce NI_STC_DMA_CHAN_SEL()H Hartley Sweeten
The inline helper ni_stc_dma_channel_select_bitfield() returns the bits needed to select a MITE channel to use for DMA. The MITE code is setup to handle up to 8 channels but in reality only channels 0 to 3 are used by most of the drivers. The PCI-6032E and PCI-6033E boards can also use channels 4 and 5. For aesthetics, convert this inline function into a macro and remove the BUG() which will never occur. 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>
2016-04-29staging: comedi: mite.h: rename CHSR_LxERR_maskH Hartley Sweeten
Fix the checkpatch.pl issue: CHECK: Avoid CamelCase: <CHSR_LxERR_mask> 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>
2016-04-29staging: comedi: ni_mio_common: fix CamelCase in ni_serial_hw_readwrite8()H Hartley Sweeten
Fix the checkpatch.pl issue: CHECK: Avoid CamelCase: <Error> 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>
2016-04-29staging: comedi: ni_mio_common: remove 'fudge_factor_80_to_20Mhz'H Hartley Sweeten
For aesthetics, remove this local variable to fix the checkpatch.pl issue: CHECK: Avoid CamelCase: <fudge_factor_80_to_20Mhz> 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>