]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
9 years agostaging: comedi: adv_pci1724: remove PCI_VENDOR_ID_ADVANTECH define
H Hartley Sweeten [Thu, 20 Nov 2014 22:10:51 +0000 (15:10 -0700)]
staging: comedi: adv_pci1724: remove PCI_VENDOR_ID_ADVANTECH define

This define is already in pci_ids.h. Remove the duplicate in this 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>
9 years agostaging: comedi: adv_pci1724: absorb set_dac()
H Hartley Sweeten [Thu, 20 Nov 2014 22:10:50 +0000 (15:10 -0700)]
staging: comedi: adv_pci1724: absorb set_dac()

Absorb this simple function into adv_pci1724_insn_write().

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>
9 years agostaging: comedi: adv_pci1724: use comedi_timeout() to wait for DAC idle state
H Hartley Sweeten [Thu, 20 Nov 2014 22:10:49 +0000 (15:10 -0700)]
staging: comedi: adv_pci1724: use comedi_timeout() to wait for DAC idle state

Use the comedi_timeout() helper to wait for the DAC to be idle before
writing to 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>
9 years agostaging: comedi: adv_pci1724: introduce adv_pci1724_insn_write()
H Hartley Sweeten [Thu, 20 Nov 2014 22:10:48 +0000 (15:10 -0700)]
staging: comedi: adv_pci1724: introduce adv_pci1724_insn_write()

The analog output, offset calib, and gain calib subdevices all use similar
(*insn_write) functions. The onyl difference is the 'mode' that is passed
to the set_dac() helper.

Introduce a new (*insn_write) function that can be used by all the subdevices.
Use the s->private member to pass the 'mode' needed by set_dac(). Remove the
subdevice specific (*insn_write) 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>
9 years agostaging: comedi: adv_pci1724: remove NUM_AO_CHANNELS define
H Hartley Sweeten [Thu, 20 Nov 2014 22:10:47 +0000 (15:10 -0700)]
staging: comedi: adv_pci1724: remove NUM_AO_CHANNELS define

This define is now only used to set each of the subdevice 'n_chan'. For
clarity, remove the define and 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>
9 years agostaging: comedi: adv_pci1724: use subdevice readback for 'gain_value'
H Hartley Sweeten [Thu, 20 Nov 2014 22:10:46 +0000 (15:10 -0700)]
staging: comedi: adv_pci1724: use subdevice readback for 'gain_value'

Use the comedi_subdevice 'readback' member and the core provided (*insn_read)
to handle the readback of the write-only gain calib subdevice. Remove the
then unused 'gain_value' member from the private data.

The private data is now unnecessary. Remove it and the allocation.

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>
9 years agostaging: comedi: adv_pci1724: use subdevice readback for 'offset_value'
H Hartley Sweeten [Thu, 20 Nov 2014 22:10:45 +0000 (15:10 -0700)]
staging: comedi: adv_pci1724: use subdevice readback for 'offset_value'

Use the comedi_subdevice 'readback' member and the core provided (*insn_read)
to handle the readback of the write-only offset calib subdevice. Remove the
then unused 'offset_value' 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>
9 years agostaging: comedi: adv_pci1724: use subdevice readback for 'ao_value'
H Hartley Sweeten [Thu, 20 Nov 2014 22:10:44 +0000 (15:10 -0700)]
staging: comedi: adv_pci1724: use subdevice readback for 'ao_value'

Use the comedi_subdevice 'readback' member and the core provided (*insn_read)
to handle the readback of the write-only analog output subdevice. Remove the
then unused 'ao_value' 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>
9 years agostaging: comedi: me4000: Fixed code style issue
Marcus Hufvudsson [Sat, 15 Nov 2014 15:55:20 +0000 (16:55 +0100)]
staging: comedi: me4000: Fixed code style issue

Fixed checkpatch.pl error message. Space prohibited before that ','

Signed-off-by: Marcus Hufvudsson <marcushuf@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: das6402: add (*do_cmd) for AI async commands
H Hartley Sweeten [Thu, 13 Nov 2014 18:41:04 +0000 (11:41 -0700)]
staging: comedi: das6402: add (*do_cmd) for AI async commands

Flesh out the (*do_cmd) function to support timed analog input
acquisitions.

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>
9 years agostaging: comedi: das6402: read analog input samples in interrupt handler
H Hartley Sweeten [Thu, 13 Nov 2014 18:41:03 +0000 (11:41 -0700)]
staging: comedi: das6402: read analog input samples in interrupt handler

Currently the interrupt handler just clears the interrupt.

Add the code necessary to read the analog input samples when running
an async command.

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>
9 years agostaging: comedi: das6402: introduce das6402_ai_set_mode()
H Hartley Sweeten [Thu, 13 Nov 2014 18:41:02 +0000 (11:41 -0700)]
staging: comedi: das6402: introduce das6402_ai_set_mode()

Introduce a helper function to set the analog input acquisition mode.
This will be needed when the (*do_cmd) function is completed to support
async commands.

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>
9 years agostaging: comedi: das6402: add basic (*do_cmdtest) for AI async commands
H Hartley Sweeten [Thu, 13 Nov 2014 18:41:01 +0000 (11:41 -0700)]
staging: comedi: das6402: add basic (*do_cmdtest) for AI async commands

Currently the async command support in this driver consists of just the
stubbed in functions.

Flesh out the (*do_cmdtest) function for basic support of timed analog
input acquisitions.

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>
9 years agostaging: comedi: fix scan_end_arg == chanlist_len assumption
Ian Abbott [Wed, 12 Nov 2014 16:00:48 +0000 (16:00 +0000)]
staging: comedi: fix scan_end_arg == chanlist_len assumption

Some comedi drivers allow the `scan_end_arg` value of an asynchronous
command to be a multiple (> 1) of the `chanlist_len` although most
require them to be the same value.

`comedi_bytes_per_scan()` is incorrectly using `chanlist_len` as the
length of the scan.  Change it to use `scan_end_arg`.

`comedi_nsamples_left()` is incorrectly using `cur_chan` as the current
sample position in the scan (it is actually the current position in the
channel list).  Change it to use the actual sample position in the scan.
(Unfortunately we only have the current scan position in bytes currently,
so convert that to a sample position.)

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: dmm32at: update the MODULE_DESCRIPTION
H Hartley Sweeten [Tue, 11 Nov 2014 23:55:46 +0000 (16:55 -0700)]
staging: comedi: dmm32at: update the MODULE_DESCRIPTION

Change the MODULE_DESCRIPTION to something more useful than the generic
"Comedi low-level 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>
9 years agostaging: comedi: dmm32at: tidy up multi-line comments
H Hartley Sweeten [Tue, 11 Nov 2014 23:55:45 +0000 (16:55 -0700)]
staging: comedi: dmm32at: tidy up multi-line comments

Reformat the multi-line comments for follow 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>
9 years agostaging: comedi: dmm32at: rename DMM32AT_AIRBACK
H Hartley Sweeten [Tue, 11 Nov 2014 23:55:44 +0000 (16:55 -0700)]
staging: comedi: dmm32at: rename DMM32AT_AIRBACK

For aesthetics, rename this define used for the Analog I/O Readback register.
Define the bits of the register.

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>
9 years agostaging: comedi: dmm32at: rename DMM32AT_AICONF
H Hartley Sweeten [Tue, 11 Nov 2014 23:55:43 +0000 (16:55 -0700)]
staging: comedi: dmm32at: rename DMM32AT_AICONF

For aesthetics, rename this define used for the Analog Configuration register.
Define the bits of the register.

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>
9 years agostaging: comedi: dmm32at: rename DMM32AT_CNTRDIO
H Hartley Sweeten [Tue, 11 Nov 2014 23:55:42 +0000 (16:55 -0700)]
staging: comedi: dmm32at: rename DMM32AT_CNTRDIO

For aesthetics, rename this define used for the Counter and Digital I/O
Configuration register. Define the bits of the register.

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>
9 years agostaging: comedi: dmm32at: rename DMM32AT_INTCLOCK
H Hartley Sweeten [Tue, 11 Nov 2014 23:55:41 +0000 (16:55 -0700)]
staging: comedi: dmm32at: rename DMM32AT_INTCLOCK

For aesthetics, rename this define used for the Interrupt and A/D Clock Control
and Status register. Also, rename the defines for the bits of the register.

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>
9 years agostaging: comedi: dmm32at: rename DMM32AT_AISTAT
H Hartley Sweeten [Tue, 11 Nov 2014 23:55:40 +0000 (16:55 -0700)]
staging: comedi: dmm32at: rename DMM32AT_AISTAT

For aesthetics, rename this define used for the A/D Status register. Also,
rename the defines for the bits of the register.

The probe code in dmm32at_reset() checks this register to make sure the
S/D1 and S/D0 bits are set. This check actually verifies that the board is
configured (with jumpers on the board) with all the Analog Input channels
operating in single-ended mode. Add a comment about this.

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>
9 years agostaging: comedi: dmm32at: rename DMM32AT_CNTRL
H Hartley Sweeten [Tue, 11 Nov 2014 23:55:39 +0000 (16:55 -0700)]
staging: comedi: dmm32at: rename DMM32AT_CNTRL

For aesthetics, rename this define used for the Miscellaneous Control
register. Also, rename the defines for the bits of the register.

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>
9 years agostaging: comedi: dmm32at: rename DMM32AT_FIFOSTAT
H Hartley Sweeten [Tue, 11 Nov 2014 23:55:38 +0000 (16:55 -0700)]
staging: comedi: dmm32at: rename DMM32AT_FIFOSTAT

For aesthetics, rename this define used for the FIFO Status register.
Define the bits of the register.

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>
9 years agostaging: comedi: dmm32at: rename DMM32AT_FIFOCNTRL
H Hartley Sweeten [Tue, 11 Nov 2014 23:55:37 +0000 (16:55 -0700)]
staging: comedi: dmm32at: rename DMM32AT_FIFOCNTRL

For aesthetics, rename this define used for the FIFO Control register.
Also, rename the defines used for the bits of this register.

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>
9 years agostaging: comedi: dmm32at: define the FIFO Depth register
H Hartley Sweeten [Tue, 11 Nov 2014 23:55:36 +0000 (16:55 -0700)]
staging: comedi: dmm32at: define the FIFO Depth register

This driver currently does not use the FIFO. For completeness, define
the offset to the FIFO Depth register.

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>
9 years agostaging: comedi: dmm32at: rename DMM32AT_DACMSB_CHAN
H Hartley Sweeten [Tue, 11 Nov 2014 23:55:35 +0000 (16:55 -0700)]
staging: comedi: dmm32at: rename DMM32AT_DACMSB_CHAN

For aesthetics, rename this define used to set the DACH[10] bits in
the DAC MSB register to select the D/A 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>
9 years agostaging: comedi: dmm32at: rename DMM32AT_DACSTAT
H Hartley Sweeten [Tue, 11 Nov 2014 23:55:34 +0000 (16:55 -0700)]
staging: comedi: dmm32at: rename DMM32AT_DACSTAT

For aesthetics, rename this define used for the Status / Auxillary Digital
Inputs register. Document the bits in the register.

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>
9 years agostaging: comedi: dmm32at: rename DMM32AT_DAC[LM]SB
H Hartley Sweeten [Tue, 11 Nov 2014 23:55:33 +0000 (16:55 -0700)]
staging: comedi: dmm32at: rename DMM32AT_DAC[LM]SB

For aesthetics, rename these defines used for the D/A LSB/MSB 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>
9 years agostaging: comedi: dmm32at: rename DMM32AT_AI{LOW,HIGH}
H Hartley Sweeten [Tue, 11 Nov 2014 23:55:32 +0000 (16:55 -0700)]
staging: comedi: dmm32at: rename DMM32AT_AI{LOW,HIGH}

For aesthetics, rename these defines used for the A/D Low/High Channel
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>
9 years agostaging: comedi: dmm32at: rename DMM32AT_AUXDOUT
H Hartley Sweeten [Tue, 11 Nov 2014 23:55:31 +0000 (16:55 -0700)]
staging: comedi: dmm32at: rename DMM32AT_AUXDOUT

For aesthetics, rename this define used for the Auxillary Digital Output
register. This register is currently not used in the driver. Document the
bits of the register for completeness.

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>
9 years agostaging: comedi: dmm32at: rename DMM32AT_AI[LM]SB
H Hartley Sweeten [Tue, 11 Nov 2014 23:55:30 +0000 (16:55 -0700)]
staging: comedi: dmm32at: rename DMM32AT_AI[LM]SB

For aesthetics, rename these defines used for the A/D LSB/MSB 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>
9 years agostaging: comedi: dmm32at: rename DMM32AT_CONV
H Hartley Sweeten [Tue, 11 Nov 2014 23:55:29 +0000 (16:55 -0700)]
staging: comedi: dmm32at: rename DMM32AT_CONV

For aesthetics, rename this define used for the Start A/D Conversion register.

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>
9 years agostaging: comedi: dmm32at: use 8255 module for Digital I/O subdevice
H Hartley Sweeten [Tue, 11 Nov 2014 23:55:28 +0000 (16:55 -0700)]
staging: comedi: dmm32at: use 8255 module for Digital I/O subdevice

The Dimond-MM-32-AT board uses an internal 82C55-type digital I/O circuit to
provide the 24 digital I/O lines. The only quirk is the need to set the page
selection bits in the control register to select page 1 addresses.

Instead of duplicating the 8255 code, provide an (*io) callback and use the
8255 module to support this subdevice.

This also removes the need for the private data in this 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>
9 years agostaging: comedi: dmm32at: introduce dmm32at_ai_set_chanspec()
H Hartley Sweeten [Tue, 11 Nov 2014 23:55:27 +0000 (16:55 -0700)]
staging: comedi: dmm32at: introduce dmm32at_ai_set_chanspec()

Introduce a helper function to set the analog input channel scan and range
control registers. Use the new helper in the analog input (*insn_read) and
(*do_cmd) functions.

The extra sanity checks in the (*do_cmd) are not necessary. The cmd->chanlist
will always be valid and the (*do_cmdtest) validates the channel list in
Step 5.

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>
9 years agostaging: comedi: dmm32at: remove unused members of the private data
H Hartley Sweeten [Tue, 11 Nov 2014 23:55:26 +0000 (16:55 -0700)]
staging: comedi: dmm32at: remove unused members of the private data

The 'data' and 'ai_inuse' members in the private data are not used in 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>
9 years agostaging: comedi: dmm32at: remove dmm32at_ns_to_timer()
H Hartley Sweeten [Tue, 11 Nov 2014 23:55:25 +0000 (16:55 -0700)]
staging: comedi: dmm32at: remove dmm32at_ns_to_timer()

This function is not necessary. It simply returns the 'ns' value that was
passed to it.

Remove it as well as the unnecessary Step 4 check of the cmd->convert_arg.

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>
9 years agostaging: comedi: dmm32at: tidy up cmd->convert_{src, arg} validation
H Hartley Sweeten [Tue, 11 Nov 2014 23:55:24 +0000 (16:55 -0700)]
staging: comedi: dmm32at: tidy up cmd->convert_{src, arg} validation

This driver only supports a single convert_src, TRIG_TIMER. Tidy up
the (*do_cmdtest) validation of the cmd->convert_{src,arg}.

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>
9 years agostaging: comedi: dmm32at: tidy up cmd->scan_begin_{src, arg} validation
H Hartley Sweeten [Tue, 11 Nov 2014 23:55:23 +0000 (16:55 -0700)]
staging: comedi: dmm32at: tidy up cmd->scan_begin_{src, arg} validation

This driver only supports a single scan_begin_src, TRIG_TIMER. Tidy up
the (*do_cmdtest) validation of the cmd->scan_begin_{src,arg}.

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>
9 years agostaging: comedi: dmm32at: tidy up subdevice initialization
H Hartley Sweeten [Tue, 11 Nov 2014 23:55:22 +0000 (16:55 -0700)]
staging: comedi: dmm32at: tidy up subdevice initialization

For aesthetics, add some whitespace to the 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>
9 years agostaging: comedi: dmm32at: introduce dmm32at_reset()
H Hartley Sweeten [Tue, 11 Nov 2014 23:55:21 +0000 (16:55 -0700)]
staging: comedi: dmm32at: introduce dmm32at_reset()

For aesthetics, factor the board reset and detection code out of the
(*attach) 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>
9 years agostaging: comedi: dmm32at: tidy up dmm32at_ai_rinsn()
H Hartley Sweeten [Tue, 11 Nov 2014 23:55:20 +0000 (16:55 -0700)]
staging: comedi: dmm32at: tidy up dmm32at_ai_rinsn()

For aesthetics, rename this function to dmm32at_ai_insn_read().

Get the 'chan' and 'range' from the chanspec when declaring the local
variables. Remove the unecessary masking of the 'chan'.

Remove some unnecessary comments.

Change the final return to 'insn->n' to clarify the return value.

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>
9 years agostaging: comedi: dmm32at: introduce dmm32_ai_get_sample()
H Hartley Sweeten [Tue, 11 Nov 2014 23:55:19 +0000 (16:55 -0700)]
staging: comedi: dmm32at: introduce dmm32_ai_get_sample()

Introduce a helper function to read the two's complement analog input
sample from the hardware and munge it to the offset binary (unsigned)
format that comedi expects. Use the comedi_offset_munge() helper to
munge the data.

Use the new helper in the analog input (*insn_read) and in the interrupt
handler for the async command.

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>
9 years agostaging: comedi: dmm32at: use comedi_async 'scans_done' to detect EOA
H Hartley Sweeten [Tue, 11 Nov 2014 23:55:18 +0000 (16:55 -0700)]
staging: comedi: dmm32at: use comedi_async 'scans_done' to detect EOA

Remove the private data member 'ai_scans_left' and use the comedi_async
'scans_done' to detect the end-of-acquisition.

This also removes the artifical max limit on the cmd->stop_arg.

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>
9 years agostaging: comedi: dmm32at: make AI (*cancel) actually cancel async command
H Hartley Sweeten [Tue, 11 Nov 2014 23:55:17 +0000 (16:55 -0700)]
staging: comedi: dmm32at: make AI (*cancel) actually cancel async command

Currently the AI (*cancel) changes a private data member to cause the
interrupt handler to cancel the async command after the next interrupt.

Move the code that disables the interrupt and terminates the acquisition
from the interrunt handler into dmm32at_ai_cancel() so that the async
command is terminated instantly.

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>
9 years agostaging: comedi: adl_pci9111: use comedi_async 'scans_done' to detect EOA
H Hartley Sweeten [Tue, 11 Nov 2014 00:28:23 +0000 (17:28 -0700)]
staging: comedi: adl_pci9111: use comedi_async 'scans_done' to detect EOA

The comedi core now counts the number of samples added to the async buffer and
detects the end-of-scan and increments the comedi_async 'scans_done' counter.

Remove the private data member 'stop_counter' and use the 'scans_done' member
to detect the end-of-acquisition.

This fixes a possible interger overflow when calculating the value of the
'stop_counter' and removes the need to accumulate the 'total' number of
samples added to the async buffer in pci9111_handle_fifo_half_full().

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>
9 years agostaging: comedi: adl_pci9118: use comedi_bytes_to_samples()
H Hartley Sweeten [Tue, 11 Nov 2014 00:57:56 +0000 (17:57 -0700)]
staging: comedi: adl_pci9118: use comedi_bytes_to_samples()

Remove the assumption of the sample size by using the comedi_bytes_to_samples()
helper function to convert the number of bytes to the number of samples.

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>
9 years agostaging: comedi: adl_pci9118: absorb move_block_from_dma()
H Hartley Sweeten [Tue, 11 Nov 2014 00:57:55 +0000 (17:57 -0700)]
staging: comedi: adl_pci9118: absorb move_block_from_dma()

Absorb this simple helper function into interrupt_pci9118_ai_dma().

Remove the unnecessary local variables 'sampls' and 'm'.

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>
9 years agostaging: comedi: adl_pci9118: use comedi_async 'scans_done' to detect EOA
H Hartley Sweeten [Tue, 11 Nov 2014 00:57:54 +0000 (17:57 -0700)]
staging: comedi: adl_pci9118: use comedi_async 'scans_done' to detect EOA

The comedi core now counts the number of samples added to the async buffer and
detects the end-of-scan and increments the comedi_async 'scans_done' counter.

Remove the private data member 'ai_act_scan' and use the 'scans_done' member
to detect the end-of-acquisition.

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>
9 years agostaging: comedi: addi_watchdog: use addi_tcw.h defines for watchdog
H Hartley Sweeten [Mon, 10 Nov 2014 23:20:21 +0000 (16:20 -0700)]
staging: comedi: addi_watchdog: use addi_tcw.h defines for watchdog

Use the generic TCW (timer/counter/watchdog) defines for the 8-bit watchdog.

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>
9 years agostaging: comedi: addi_apci_1564: enable support for PLD Rev 1.0 I/O mapping
H Hartley Sweeten [Mon, 10 Nov 2014 23:20:20 +0000 (16:20 -0700)]
staging: comedi: addi_apci_1564: enable support for PLD Rev 1.0 I/O mapping

Remove the error return in the (*auto_attach) and allow the driver to
attach to APC-1564 boards that use the PLD Rev 1.0 I/O mapping.

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>
9 years agostaging: comedi: addi_apci_1564: use addi_tcw.h defines for counters
H Hartley Sweeten [Mon, 10 Nov 2014 23:20:19 +0000 (16:20 -0700)]
staging: comedi: addi_apci_1564: use addi_tcw.h defines for counters

Use the generic TCW (timer/counter/watchdog) defines for the 32-bit counters.

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>
9 years agostaging: comedi: addi_apci_1564: use addi_tcw.h defines for timer
H Hartley Sweeten [Mon, 10 Nov 2014 23:20:18 +0000 (16:20 -0700)]
staging: comedi: addi_apci_1564: use addi_tcw.h defines for timer

Use the generic TCW (timer/counter/watchdog) defines for the 12-bit timer.

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>
9 years agostaging: comedi: addi_tcw.h: provide generic defines for the ADDI-DATA TCW
H Hartley Sweeten [Mon, 10 Nov 2014 23:20:17 +0000 (16:20 -0700)]
staging: comedi: addi_tcw.h: provide generic defines for the ADDI-DATA TCW

The TCW (timer/counter/watchdog) devices in the various ADDI-DATA drivers
use a common register map definition. Provide a common generic define for
these registers so they don't have to be replicated in each 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>
9 years agostaging: comedi: addi_apci_1564: split timer and counter subdevices
H Hartley Sweeten [Mon, 10 Nov 2014 23:20:16 +0000 (16:20 -0700)]
staging: comedi: addi_apci_1564: split timer and counter subdevices

The timer subdevice is currently broken in this driver.

The Rev 1.0 and 2.x versions of the board both have a 12-bit timer. But only
the Rev 2.x boards have the 3 32-bit counters.

Split the current timer subdevice into two separate subdevices:
  1) A single channel 12-bit timer subdevice
  2) A three channel 32-bit counter subdevice

This represents the hardware correctly and the counters can be disabled on
the Rev 1.0 boards.

Split up the current (*insn_config), (*insn_write), and (*insn_read) so they
only deal with the hardware associated with 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>
9 years agostaging: comedi: addi_apci_1564: move counter register defines to driver
H Hartley Sweeten [Mon, 10 Nov 2014 23:20:15 +0000 (16:20 -0700)]
staging: comedi: addi_apci_1564: move counter register defines to driver

Move the defines for the counter registers from the included source
file to the main driver source file.

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>
9 years agostaging: comedi: addi_apci_1564: fix counter code in main driver source
H Hartley Sweeten [Mon, 10 Nov 2014 23:20:14 +0000 (16:20 -0700)]
staging: comedi: addi_apci_1564: fix counter code in main driver source

The Rev 1.0 APCI-1564 boards do not have counters.

Fix the code in the main driver source so that the I/O accesses to the
counters do not happen if the devpriv->counters member is not initialized.

This does not fix the code in hwdrv_apci1564.c. That code violates the
comedi API and is currently broken.

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>
9 years agostaging: comedi: addi_apci_1564: fix timer iobase for all PLD revisions
H Hartley Sweeten [Mon, 10 Nov 2014 23:20:13 +0000 (16:20 -0700)]
staging: comedi: addi_apci_1564: fix timer iobase for all PLD revisions

The APCI-1564 has different I/O mapping depending on if the PLD revision
is Rev 1.0 or Rev 2.x.

Add a member, 'timer', to the private data for the base address of the
12-bit timer. Fix the register defines so they will work for all PLD
revisions and initialize the devpriv->timer appropriately.

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>
9 years agostaging: comedi: addi_apci_1564: fix dev->iobase for all PLD revisions
H Hartley Sweeten [Mon, 10 Nov 2014 23:20:12 +0000 (16:20 -0700)]
staging: comedi: addi_apci_1564: fix dev->iobase for all PLD revisions

The APCI-1564 has different I/O mapping depending on if the PLD revision is
Rev 1.0 or Rev 2.x.

Fix the main register defines so they will work for all PLD revisions and
initialie the dev->iobase appropriately. Move the register defines to the
main driver source file.

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>
9 years agostaging: comedi: addi_apci_1564: detect PLD revision for I/O mapping
H Hartley Sweeten [Mon, 10 Nov 2014 23:20:11 +0000 (16:20 -0700)]
staging: comedi: addi_apci_1564: detect PLD revision for I/O mapping

The APCI-1564 has different I/O mapping depending on if the PLD revision is
Rev 1.0 or Rev 2.x. The revision can be determined by reading the EEPROM
register at offset 0x00 of PCI BAR 0 and checking the value of bits 7 to 4.

Add this check to apci1564_auto_attach(). Currently this driver is coded
to work with the Rev 2.x I/O mapping. For now, fail the attach if a Rev 1.0
PLD is detected. Document the I/O mapping for both revisions.

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>
9 years agostaging: comedi: addi_apci_1564: use dev->iobase for main registers
H Hartley Sweeten [Mon, 10 Nov 2014 23:20:10 +0000 (16:20 -0700)]
staging: comedi: addi_apci_1564: use dev->iobase for main registers

According to ADDI-DATA, the PLD Revision 2.x versions of the APCI-1564 use
PCI BAR 0 for the main registers of the board.

Remove the 'amcc_iobase' member of the private data and use the dev->iobase
to store the base address of PCI BAR 1.

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>
9 years agostaging: comedi: addi_apci_1564: store PCI BAR 1 base address in private data
H Hartley Sweeten [Mon, 10 Nov 2014 23:20:09 +0000 (16:20 -0700)]
staging: comedi: addi_apci_1564: store PCI BAR 1 base address in private data

According to ADDI-DATA, only the PLD Revision 2.x versions of the APCI-1564
have the 3 counters. The base address for these counters is found in PCI BAR 1.

For aesthetics, save this base address in the private data. The dev->iobase
can then be used for the main registers of the board.

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>
9 years agostaging: comedi: addi_apci_1564: use correct I/O base for APCI1564_DI_INT_STATUS_REG
H Hartley Sweeten [Mon, 10 Nov 2014 23:20:08 +0000 (16:20 -0700)]
staging: comedi: addi_apci_1564: use correct I/O base for APCI1564_DI_INT_STATUS_REG

The APCI1564_DI_INT_STATUS_REG is located in the PCI BAR 0 I/O space. That
base address is stored in devpriv->amcc_iobase. Use that to correctly read
the register.

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>
9 years agostaging: comedi: addi_apci_1564: board does not use an AMCC PCI controller
H Hartley Sweeten [Mon, 10 Nov 2014 23:20:07 +0000 (16:20 -0700)]
staging: comedi: addi_apci_1564: board does not use an AMCC PCI controller

According to ADDI-DATA, the APCI-1564 board has a FPGA with a PCI core, it
does not use an AMCC PCI controller chip.

Remove the amcc_s5933.h include as well as the read of the AMCC_OP_REG_INTCSR
register. That offset would actually read APCI1564_WDOG_STATUS_REG register
in the FPGA which has nothing to do with the interrupt status.

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>
9 years agortl8188eu: Fix a typo in rtw_led.*
Krzysztof Konopko [Thu, 6 Nov 2014 23:24:27 +0000 (00:24 +0100)]
rtl8188eu: Fix a typo in rtw_led.*

A rather obvious typo in one of the identifier has been found.  This patch
fixes the typo and ensures any lines changed do not exceed 80 characters
as indicated by scripts/checkpatch.pl

Signed-off-by: Krzysztof Konopko <kris@konagma.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agortl8188eu: Fix FSF_MAILING_ADDRESS in rtw_led.*
Krzysztof Konopko [Thu, 6 Nov 2014 23:24:26 +0000 (00:24 +0100)]
rtl8188eu: Fix FSF_MAILING_ADDRESS in rtw_led.*

rtw_led.* files include Free Software Foundation's mailing address in
the sample GPL notice.  This is not desired and picked when running
scripts/checkpatch.pl.

Signed-off-by: Krzysztof Konopko <kris@konagma.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agortl8188eu: Simplify rtw_endofpktfile() in xmit_linux.c
Krzysztof Konopko [Mon, 10 Nov 2014 18:54:22 +0000 (18:54 +0000)]
rtl8188eu: Simplify rtw_endofpktfile() in xmit_linux.c

scripts/checkpatch.pl reports a coding style problem in xmit_linux.c

  WARNING:BRACES: braces {} are not necessary for single statement blocks
  #61852: FILE: rtl8188eu/os_dep/xmit_linux.c:70:

This patch removes unnecessary braces and simplifies the function to a
single return statement.

Signed-off-by: Krzysztof Konopko <kris@konagma.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: add missing tasklet_kill on remove path
Devendra Naga [Mon, 24 Nov 2014 03:12:20 +0000 (22:12 -0500)]
staging: rtl8192e: add missing tasklet_kill on remove path

The powersave tasklet is created in rtllib_softmac_init and
it is not removed while unloading the module.

Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wlan-ng: prism2fw: fixed code style issue
Aede Symen Hoekstra [Sun, 16 Nov 2014 15:48:49 +0000 (16:48 +0100)]
staging: wlan-ng: prism2fw: fixed code style issue

Fixed checkpatch.pl warning message: line over 80 characters

Signed-off-by: Aede Symen Hoekstra <aedesymen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers:staging:dgap: Added a blank line after declaration
Anjana Sasindran [Thu, 20 Nov 2014 18:57:50 +0000 (00:27 +0530)]
Drivers:staging:dgap: Added a blank line after declaration

This patch fixes the checkpatch.pl warning:

WARNING:Missing a blank line after declaration

Signed-off-by: Anjana Sasindran <anjanasasindran123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: olpc_dcon: Deletion of a check before backlight_device_unregister()
Markus Elfring [Mon, 24 Nov 2014 21:58:48 +0000 (22:58 +0100)]
staging: olpc_dcon: Deletion of a check before backlight_device_unregister()

The backlight_device_unregister() function tests whether its argument is NULL
and then returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: ozwpan: Deletion of unnecessary checks before the function call "oz_free_urb...
Markus Elfring [Tue, 25 Nov 2014 15:51:08 +0000 (16:51 +0100)]
staging: ozwpan: Deletion of unnecessary checks before the function call "oz_free_urb_link"

The oz_free_urb_link() function tests whether its argument is NULL
and then returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fwserial: remove multiple blank lines
Le Tan [Tue, 11 Nov 2014 07:40:23 +0000 (15:40 +0800)]
staging: fwserial: remove multiple blank lines

This patch fixes the multiple blank lines issue complained by checkpatch.pl
by removing useless blank lines.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: panel: Use better names for two defined values
Mariusz Gorski [Wed, 12 Nov 2014 01:08:09 +0000 (02:08 +0100)]
staging: panel: Use better names for two defined values

Give DEFAULT_KEYPAD and DEFAULT_LCD defines better names,
so that their meaning is emphasized.

Signed-off-by: Mariusz Gorski <marius.gorski@gmail.com>
Acked-By: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: panel: Reorder module parameter declarations
Mariusz Gorski [Wed, 12 Nov 2014 01:08:08 +0000 (02:08 +0100)]
staging: panel: Reorder module parameter declarations

Change the order of the module parameter declarations
so that it matches the Kconfig order.

Signed-off-by: Mariusz Gorski <marius.gorski@gmail.com>
Acked-By: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: panel: Reorder DEFAULT_* values redefines
Mariusz Gorski [Wed, 12 Nov 2014 01:08:07 +0000 (02:08 +0100)]
staging: panel: Reorder DEFAULT_* values redefines

Change the order of the DEFAULT_* values redefines so that it
matches the Kconfig order.

Signed-off-by: Mariusz Gorski <marius.gorski@gmail.com>
Acked-By: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: panel: Reorder initial DEFAULT_* defines
Mariusz Gorski [Wed, 12 Nov 2014 01:08:06 +0000 (02:08 +0100)]
staging: panel: Reorder initial DEFAULT_* defines

Change the order of the initial DEFAULT_* defines so that it
matches the Kconfig order.

Signed-off-by: Mariusz Gorski <marius.gorski@gmail.com>
Acked-By: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon-usb: eliminate cvmx_dprintf() usage
Aaro Koskinen [Fri, 7 Nov 2014 21:43:34 +0000 (23:43 +0200)]
staging: octeon-usb: eliminate cvmx_dprintf() usage

Eliminate cvmx_dprintf() usage and use dev_err() instead.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon-usb: move helper functions
Aaro Koskinen [Fri, 7 Nov 2014 21:43:33 +0000 (23:43 +0200)]
staging: octeon-usb: move helper functions

Move helper functions to make them visible to all functions.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon-ethernet: drop multiple NAPI instances
Aaro Koskinen [Fri, 7 Nov 2014 20:44:58 +0000 (22:44 +0200)]
staging: octeon-ethernet: drop multiple NAPI instances

Octeon Ethernet driver is currently trying to wake up multiple
CPU cores for parallel NAPI processing when needed, to cope
with the fact that all network interfaces are handled through
the same receive queue processed by a single core/interrupt
(see http://marc.info/?l=linux-kernel&m=137209784914565&w=2).

This partially overlaps with generic RPS functionality.
Commit a6a39a7fcff5 ("staging: octeon-ethernet: disable load balance
for receiving packet when CONFIG_RPS is enabled") already disabled this
when RPS is enabled. Let's delete this code altogether as it has issues
like packet reordering and potential problems with CPU offlining/onlining.

Tested on EdgeRouter Lite.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Acked-By: David Daney <david.daney@cavium.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: android: ion: Deletion of unnecessary checks before two function calls
Markus Elfring [Sun, 23 Nov 2014 17:48:15 +0000 (18:48 +0100)]
staging: android: ion: Deletion of unnecessary checks before two function calls

The functions ion_heap_destroy() and vfree() perform also input
parameter validation. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: rf.c clean up function comments
Malcolm Priestley [Wed, 12 Nov 2014 21:11:15 +0000 (21:11 +0000)]
staging: vt6655: rf.c clean up function comments

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: rf.c Removed unneeded comments
Malcolm Priestley [Wed, 12 Nov 2014 21:11:14 +0000 (21:11 +0000)]
staging: vt6655: rf.c Removed unneeded comments

Type and function that are not present comments

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: rf.c: Remove author comments
Malcolm Priestley [Wed, 12 Nov 2014 21:11:13 +0000 (21:11 +0000)]
staging: vt6655: rf.c: Remove author comments

Moving names to file header comment

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: rf.c camel calse vnt_private rename pDevice to priv
Malcolm Priestley [Wed, 12 Nov 2014 21:11:12 +0000 (21:11 +0000)]
staging: vt6655: rf.c camel calse vnt_private rename pDevice to priv

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: IFRFbWriteEmbedded replace __iomem with vnt_private
Malcolm Priestley [Wed, 12 Nov 2014 21:11:11 +0000 (21:11 +0000)]
staging: vt6655: IFRFbWriteEmbedded replace __iomem with vnt_private

Fixing callers to vnt_private

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: rf remove __iomem *dwIoBase from functions
Malcolm Priestley [Wed, 12 Nov 2014 21:11:10 +0000 (21:11 +0000)]
staging: vt6655: rf remove __iomem *dwIoBase from functions

replacing with vnt_private and removing dereferencing from callers

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: card.c move __iomem into functions.
Malcolm Priestley [Wed, 12 Nov 2014 21:11:09 +0000 (21:11 +0000)]
staging: vt6655: card.c move __iomem into functions.

Removing dereferencing from callers

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: card Remove function vUpdateIFS
Malcolm Priestley [Wed, 12 Nov 2014 21:11:08 +0000 (21:11 +0000)]
staging: vt6655: card Remove function vUpdateIFS

vUpdateIFS does the same operations of CARDbSetPhyParameter there
is not need to call this function.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: always keep abyCurrentNetAddr aligned to 2
Malcolm Priestley [Fri, 7 Nov 2014 19:06:09 +0000 (19:06 +0000)]
staging: vt6655: always keep abyCurrentNetAddr aligned to 2

Because the driver now uses ether_addr_copy the alignment of this
variable must be maintained at 2.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: change typedef enum _VIA_PKT_TYPE to macro
Malcolm Priestley [Fri, 7 Nov 2014 19:06:08 +0000 (19:06 +0000)]
staging: vt6655: change typedef enum _VIA_PKT_TYPE to macro

Replacing for u8 type and removing cast for byBBType.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: replace typedef enum _VIA_BB_TYPE with macros
Malcolm Priestley [Fri, 7 Nov 2014 19:06:07 +0000 (19:06 +0000)]
staging: vt6655: replace typedef enum _VIA_BB_TYPE with macros

Replacing type with u8

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: CARDbSetPhyParameter remove unused parameters
Malcolm Priestley [Fri, 7 Nov 2014 19:06:06 +0000 (19:06 +0000)]
staging: vt6655: CARDbSetPhyParameter remove unused parameters

wCapInfo
byERPField,
*pvSupportRateIEs
*pvExtSupportRateIEs

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: dead code remove typedef enum _CARD_PHY_TYPE
Malcolm Priestley [Fri, 7 Nov 2014 19:06:05 +0000 (19:06 +0000)]
staging: vt6655: dead code remove typedef enum _CARD_PHY_TYPE

Removing unused eCurrentPHYType

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: s_vCalculateOFDMRParameter use bb_type for CARD_PHY_TYPE
Malcolm Priestley [Fri, 7 Nov 2014 19:06:04 +0000 (19:06 +0000)]
staging: vt6655: s_vCalculateOFDMRParameter use bb_type for CARD_PHY_TYPE

using u8 for bb_type and replacing PHY_TYPE_11A with BB_TYPE_11A

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: CARDvSetRSPINF us bb_type for CARD_PHY_TYPE
Malcolm Priestley [Fri, 7 Nov 2014 19:06:03 +0000 (19:06 +0000)]
staging: vt6655: CARDvSetRSPINF us bb_type for CARD_PHY_TYPE

Using u8 for bb_type

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: CARDbSetPhyParameter change CARD_PHY_TYPE to bb_type
Malcolm Priestley [Fri, 7 Nov 2014 19:06:02 +0000 (19:06 +0000)]
staging: vt6655: CARDbSetPhyParameter change CARD_PHY_TYPE to bb_type

using u8 for bb_type

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: dead code remove CARDbAddBasicRate
Malcolm Priestley [Fri, 7 Nov 2014 19:06:01 +0000 (19:06 +0000)]
staging: vt6655: dead code remove CARDbAddBasicRate

we nonlonger set rates in the driver

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: CARDvUpdateBasicTopRate use basic_rates to find top rate
Malcolm Priestley [Fri, 7 Nov 2014 19:06:00 +0000 (19:06 +0000)]
staging: vt6655: CARDvUpdateBasicTopRate use basic_rates to find top rate

basic_rates should now be used to find it.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: ldlm: Remove space before braces for defined() check
Andreas Ruprecht [Sun, 23 Nov 2014 13:37:56 +0000 (14:37 +0100)]
staging: lustre: ldlm: Remove space before braces for defined() check

checkpatch complains about two places where a space is prohibited
before the braces for in "#if defined()" check. This patch removes
these warnings.

Signed-off-by: Andreas Ruprecht <rupran@einserver.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: ldlm: Remove unnecessary braces at ifs
Andreas Ruprecht [Sun, 23 Nov 2014 13:37:55 +0000 (14:37 +0100)]
staging: lustre: ldlm: Remove unnecessary braces at ifs

checkpatch complains about three places where braces are not
necessary. This patch removes the braces.

Signed-off-by: Andreas Ruprecht <rupran@einserver.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>