summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'staging-3.10-rc1' of ↵Linus Torvalds2013-04-29627-76244/+65068
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver tree update from Greg Kroah-Hartman: "Here's the big staging driver tree update for 3.10-rc1 This update contains loads of comedi driver cleanups and fixes in here, iio updates, android driver changes, and other various staging driver cleanups. Thanks to some drivers being removed, and the comedi driver cleanups, we have removed more code than we added: 627 files changed, 65145 insertions(+), 76321 deletions(-) which is always nice to see. All of these have been in linux-next for a while." * tag 'staging-3.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (940 commits) staging: comedi: ni_labpc: fix legacy driver build staging: comedi: das800: cleanup the cio-das802/16 fifo comments staging: comedi: das800: rename CamelCase vars in das800_ai_do_cmd() staging: comedi: das800: tidy up the private data staging: comedi: das800: tidy up das800_interrupt() staging: comedi: das800: tidy up das800_ai_insn_read() staging: comedi: das800: tidy up das800_di_insn_bits() staging: comedi: das800: tidy up das800_do_insn_bits() staging: comedi: das800: remove extra divisor calculation call staging: comedi: das800: rename {enable,disable}_das800 staging: comedi: das800: tidy up subdevice init staging: comedi: das800: allow attaching without interrupt support staging: comedi: das800: interrupts are required for async command support staging: comedi: das800: tidy up das800_ai_do_cmdtest() staging: comedi: das800: remove 'volatile' on private data variables staging: comedi: das800: cleanup the boardinfo staging: comedi: das800: cleanup range table declarations staging: comedi: das800: introduce das800_ind_{write, read}() staging: comedi: das800: remove forward declarations staging: comedi: das800: move das800_set_frequency() ...
| * staging: comedi: ni_labpc: fix legacy driver buildH Hartley Sweeten2013-04-231-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CONFIG_COMEDI_NI_LABPC_ISA is a tristate option. #if IS_ENABLED() needs to be used instead of #ifdef in order to build the legacy specific code in this driver. The local variable 'board' is not used in labpc_attach(). Remove it. The labpc_detach() function is only referenced in this file. Make it static. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: comedi: das800: cleanup the cio-das802/16 fifo commentsH Hartley Sweeten2013-04-231-2/+2
| | | | | | | | | | | | | | | | | | | | Cleanup the comments about the cio-das802/16 specific register defines. This also removes a checkpatch.pl warning about > 80 char 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>
| * staging: comedi: das800: rename CamelCase vars in das800_ai_do_cmd()H Hartley Sweeten2013-04-231-9/+6
| | | | | | | | | | | | | | | | | | | | | | Rename the CamelCase variables in das800_ai_do_cmd(). For aesthetic reasons, initialize the variables when they are declared. 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>
| * staging: comedi: das800: tidy up the private dataH Hartley Sweeten2013-04-231-5/+5
| | | | | | | | | | | | | | | | | | | | For aesthetic reasons, change the 'do_bits' type to unsigned int to match the subdevice s->state. and change the 'forever' flag to a bool. 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>
| * staging: comedi: das800: tidy up das800_interrupt()H Hartley Sweeten2013-04-231-48/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename the CamelCase variable 'dataPoint'. Cleanup some of the comments and fix the > 80 char lines. Use the das800_ai_get_sample() helper to get the analog input data. Change the fifo flags into bools and make sure to check for the fifo overflow while reading the samples. This also fixes the overflow detection for 12-bit resolutions. In the current code the 'dataPoint' value has been shifted and masked. This could result in fifo_overflow being invalidly true. Remove the need for the 'thisboard' pointer by using the subdevice 'maxdata' to determine the sample size. The devpriv->forever flag is really a bool. Treat it as such. Remove the comedi_error() messages. The user will get the error condition back in the async event. The message is just added 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>
| * staging: comedi: das800: tidy up das800_ai_insn_read()H Hartley Sweeten2013-04-231-28/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a couple helper functions to read the 16-bit analog input sample and to wait for the analog conversion to complete. Tidy up the das800_ai_insn_read() function by using the new helpers. Also, remove the need for 'thisboard' in the function by checking the subdevice 'maxdata' variable to determine the analog input resolution. 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>
| * staging: comedi: das800: tidy up das800_di_insn_bits()H Hartley Sweeten2013-04-231-6/+1
| | | | | | | | | | | | | | | | | | For digital input subdevices, the (*insn_bits) function simply needs to return the status of the input channels in data[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>
| * staging: comedi: das800: tidy up das800_do_insn_bits()H Hartley Sweeten2013-04-231-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a couple local variables, mask and bits, to clarify this function. Its only necessary to update the outputs if the mask indicates that the bits are changing. Modify this function accordingly. Also, use the subdevice 'state' variable to hold the actual output channel state instead of needing to get it from the private data and shift 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>
| * staging: comedi: das800: remove extra divisor calculation callH Hartley Sweeten2013-04-231-5/+0
| | | | | | | | | | | | | | | | | | | | | | The comedi core always calls the (*do_cmdtest) function before it calls the (*do_cmd) function. The divisors were already calculated in das800_ai_do_cmdtest(), it is not necessary to calculate them again in das800_ai_do_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>
| * staging: comedi: das800: rename {enable,disable}_das800H Hartley Sweeten2013-04-231-10/+8
| | | | | | | | | | | | | | | | | | For aesthetic reasons, rename these functions to match the namespace of the rest of the driver. Also, remove the unnecessary comments. 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>
| * staging: comedi: das800: tidy up subdevice initH Hartley Sweeten2013-04-231-26/+29
| | | | | | | | | | | | | | | | | | For aesthetic reasons, rename some of the subdevice functions to help with greps and add some whitespace to the subdevice init. 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>
| * staging: comedi: das800: allow attaching without interrupt supportH Hartley Sweeten2013-04-231-14/+6
| | | | | | | | | | | | | | | | | | | | Interrupts are only requires for the analog input async command support. Allow the driver to attach to the board if the request_irq() fails. 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>
| * staging: comedi: das800: interrupts are required for async command supportH Hartley Sweeten2013-04-231-16/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | Interrupt support is optional with this driver. Only hook up the async command support for the analog input subdevice if the user requested an interrupt when attaching to the board. This also allows removing the extra test in das800_ai_do_cmd(). For aesthetic reasons, add some whitespace to the subdevice init. 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>
| * staging: comedi: das800: tidy up das800_ai_do_cmdtest()H Hartley Sweeten2013-04-231-16/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For aesthetic reasons, move some of the local variables to the place they are actually used. Also, rename the CamelCase 'startChan' local variable. Remove the unnecessary '()' around the variables passed in the i8253_cascade_ns_to_timer_2div() call. Add a local variable, 'next', to hold the cmd->chanlist[i] value used in the loop that checks the channel/gain list. Replace the comedi_error() with dev_dbg() and shorten the messages 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>
| * staging: comedi: das800: remove 'volatile' on private data variablesH Hartley Sweeten2013-04-231-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | As indicated by checkpatch.pl, "WARNING: Use of volatile is usually wrong: ...". The variables in the private data that are marked volatile don't need to be. Remove the volatile. Also, cleanup the comments to avoid > 80 char 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>
| * staging: comedi: das800: cleanup the boardinfoH Hartley Sweeten2013-04-231-81/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For aesthetic reasons, name the enum used for the boardinfo indexes and change them to uppercase with the prefix BOARD_. Add some whitespace to the boardinfo declaration and use the enum values to clarify the table. Tidy up the das800_probe() function and only output a dev_dbg() message if a board model is actually probed. If the user provided the correct boardname when attaching to this driver the message is just added noise. For the 'default' case when checking the proded id, output the id_bits and return -EINVAL. It should not be assumed that unknown boards will work with 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>
| * staging: comedi: das800: cleanup range table declarationsH Hartley Sweeten2013-04-231-47/+43
| | | | | | | | | | | | | | | | | | | | | | Use the BIP_RANGE and UNI_RANGE macros to define the range tables instead of the more generic RANGE macro. Tidy up the whitespace of the tables. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: comedi: das800: introduce das800_ind_{write, read}()H Hartley Sweeten2013-04-231-23/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | The GAS800_GAIN register contains some bits that enable indirect writing to additional registers on the board through iobase + 2 and indirect reading of addition registers through iobase + 7. Introduce some helper functions to handle the indirect register write/read. 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>
| * staging: comedi: das800: remove forward declarationsH Hartley Sweeten2013-04-231-116/+109
| | | | | | | | | | | | | | | | | | Move the das800_cancel() and das800_interrupt() functions to remove the need for the remaining forward declarations. 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>
| * staging: comedi: das800: move das800_set_frequency()H Hartley Sweeten2013-04-231-17/+15
| | | | | | | | | | | | | | | | | | Move das800_set_frequency() to avoid the need for the forward declaration. 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>
| * staging: comedi: das800: move das800_probe()H Hartley Sweeten2013-04-231-67/+65
| | | | | | | | | | | | | | | | | | For aesthetic reasons, move the das800_probe() function near its only caller, das800_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>
| * staging: comedi: das800: move das800_attach()H Hartley Sweeten2013-04-231-105/+90
| | | | | | | | | | | | | | | | | | | | The move the das800_attach() function near the comedi_driver declaration at the end of the file. This also removes the need for some of the forward declarations. 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>
| * staging: comedi: das800: move module_{init, exit} to end of fileH Hartley Sweeten2013-04-231-14/+11
| | | | | | | | | | | | | | | | | | | | | | The module_comedi_driver() macro provides the module_{init.exit} code for this driver. Move the macro call and the comedi_driver declaration to the end of the file. This also removes the need for the das800_attach() forward declaration. 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>
| * staging: video: imx: Add BGR666 support for parallel displayMarek Vasut2013-04-233-1/+12
| | | | | | | | | | | | | | | | | | | | Support the BGR666 format on the IPUv3 parallel display. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: dwc2: add platform device bindingsMatthijs Kooijman2013-04-235-2/+167
| | | | | | | | | | | | | | | | | | This adds a dwc_platform.ko module that can be loaded by using compatible = "snps,dwc2" in a device tree. Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl> Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: dwc2: check for null pointer before dereferencing itPaul Zimmerman2013-04-231-6/+5
| | | | | | | | | | | | | | | | | | We were testing qtd->urb pointer for null after we had already dereferenced it Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: dwc2: add missing newlines to debug messagesPaul Zimmerman2013-04-234-7/+7
| | | | | | | | | | | | | | A few debug messages were missing newlines, add them Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: dwc2: fix potential null pointer accessPaul Zimmerman2013-04-231-5/+5
| | | | | | | | | | | | | | | | | | We were testing hsotg pointer for null after we had already dereferenced it Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: comedi: ni_labpc: remove 'bustype' from boardinfoH Hartley Sweeten2013-04-234-7/+0
| | | | | | | | | | | | | | | | The 'bustype' in the boardinfo 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>
| * staging: comedi: ni_labpc: remove unnecessary 'bustype' checkH Hartley Sweeten2013-04-231-3/+1
| | | | | | | | | | | | | | | | | | | | | | Only the ISA versions of the LabPC boards support DMA and the devpriv->dma_chan is only set during the ISA board attach if DMA is available. The extra check of the board->bustype is not necessary in labpc_ai_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>
| * staging: comedi: ni_labpc: pass the isr_flags to labpc_common_attach()H Hartley Sweeten2013-04-234-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | The PCI and PCMCIA LabPC boards use shared interrupts and need the IRQF_SHARED flag set when requesting the irq, the ISA boards do not. Instead of checking the 'bustype' in labpc_common_attach() in order to determine the isr_flags, just pass the flags as a parameter to 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>
| * staging: comedi: ni_labpc: move DMA init out of the common attachH Hartley Sweeten2013-04-234-26/+30
| | | | | | | | | | | | | | | | | | | | | | | | Only the ISA versions of the LabPC boards support DMA. Move the DMA initialization out of the labpc_common_attach() and put it in the ISA specific labpc_attach() function. Remove the 'dma_chan' parameter from labpc_common_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>
| * staging: comedi: ni_labpc: split out PCI supportH Hartley Sweeten2013-04-234-165/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the ni_labpc driver is used by the legacy (ISA), PCI, and PCMCIA versions of the LabPC board. The driver is enabled under the COMEDI_PCI_DRIVERS section of the Kconfig. This means that PCI support must be enabled in order to use the ni_labpc driver for the PCI or PCMCIA drivers. Split the PCI support code out of the ni_labpc driver into a separate driver, ni_labpc_pci. The PCMCIA support is already slip out as ni_labpc_cs. Modify the Kconfig so that the common code in ni_labpc is enabled by the Kconfig option COMEDI_NI_LABPC. The ISA support code is currently still in the ni_labpc driver but is only compiled in if COMEDI_NI_LABPC_ISA is also enabled. This allows the PCI and PCMCIA drivers to be enabled without the need for the ISA stuff. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: comedi/daqboard2000: use mdelay for large delaysArnd Bergmann2013-04-231-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On ARM, it is not legal to pass values larger than 2ms into udelay(), and mdelay() must be used instead, to avoid this build error: ERROR: "__bad_udelay" [drivers/staging/comedi/drivers/daqboard2000.ko] undefined! On a related note, any use of mdelay() or large udelay() numbers should be carefully reviewed, and replaced with msleep() or a different implementation that does not rely on delaying the work. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: nvec: allow modular buildArnd Bergmann2013-04-231-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The serio code can be a loadable module, which in turn means that nvec also has to be a module, so mark it as "tristate" in Kconfig. drivers/built-in.o: In function `nvec_mouse_remove': drivers/staging/nvec/nvec_ps2.c:136: undefined reference to `serio_unregister_port' drivers/built-in.o: In function `nvec_mouse_probe': drivers/staging/nvec/nvec_ps2.c:126: undefined reference to `__serio_register_port' drivers/built-in.o: In function `nvec_ps2_notifier': drivers/staging/nvec/nvec_ps2.c:84: undefined reference to `serio_interrupt' drivers/staging/nvec/nvec_ps2.c:91: undefined reference to `serio_interrupt' Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging/zsmalloc: don't use pgtable-mapping from modulesArnd Bergmann2013-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Building zsmalloc as a module does not work on ARM because it uses an interface that is not exported: ERROR: "flush_tlb_kernel_range" [drivers/staging/zsmalloc/zsmalloc.ko] undefined! Since this is only used as a performance optimization and only on ARM, we can avoid the problem simply by not using that optimization when building zsmalloc it is a loadable module. flush_tlb_kernel_range is often an inline function, but out of the architectures that use an extern function, only powerpc exports it. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Seth Jennings <sjenning@linux.vnet.ibm.com> Cc: Nitin Gupta <ngupta@vflare.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging/ozwpan: info leak in oz_cdev_ioctl()Dan Carpenter2013-04-221-0/+1
| | | | | | | | | | | | | | | | | | If we're not maxed out then oz_get_pd_list() leaves part of the "list" struct uninitialized. We should clear this so that no stack information is leaked to userspace. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: dgrp: info leak in dgrp_dpa_ioctl()Dan Carpenter2013-04-221-0/+1
| | | | | | | | | | | | | | | | | | If "nd->nd_vpd_len" is less than 512 then the last part of the "vpd.vpd_data" has uninitialized stack information. We need to clear it before copying the buffer to user space. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: comedi: pcl816: remove unused RTC dma supportH Hartley Sweeten2013-04-221-135/+11
| | | | | | | | | | | | | | | | | | | | All the RTC dma support code in this driver is #ifdef'ed out. Remove the unused code to assist in cleaning up this driver. 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>
| * staging: comedi: pcl818: remove unused RTC dma supportH Hartley Sweeten2013-04-221-439/+13
| | | | | | | | | | | | | | | | | | | | All the RTC dma support code in this driver is #ifdef'ed out. Remove the unused code to assist in cleaning up this driver. 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>
| * staging: comedi: drivers: free_irq() in comedi_legacy_detach()H Hartley Sweeten2013-04-1925-116/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All the legacy comedi drivers now call comedi_legacy_detach() either directly or as part of their (*detach). Move the free_irq() into comedi_legacy_detach() so that the drivers don't have to deal with it. For drivers that then only call comedi_legacy_detach() in their private (*detach), remove the private function and use the helper directly for the (*detach). The amplc_pc236 and ni_labpc drivers are hybrid legacy/PCI drivers. In the detach of a PCI board free_irq() still needs to be handled by the driver. The pcl724 and pcl726 drivers currently have the free_irq() #ifdef'ed out. The comedi_legacy_detach() function sanity checks that the irq has been requested before freeing it so they are safe to convert. For aesthetic reasons, move the #ifdef unused chunk in the pcl816 driver up to the previous #ifdef unused block. The pcmio and pcmuio drivers request multiple irqs and handle the freeing of them. Remove the 'dev->irq = irq[0]' in those drivers so that comedi_legacy_detach() does not attempt to free the irq. 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>
| * staging: comedi: drivers: use comedi_legacy_detach()H Hartley Sweeten2013-04-1924-56/+27
| | | | | | | | | | | | | | | | | | Use comedi_legacy_detach() to release the I/O region requested by these 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>
| * staging: comedi: skel: use comedi_legacy_detach()H Hartley Sweeten2013-04-191-4/+5
| | | | | | | | | | | | | | | | | | | | Update the skeleton driver to use the new comedi_legacy_detach() helper in the (*detach) to release the I/O region. Also, update the comment about 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>
| * staging: comedi: amplc_dio200: use comedi_legacy_detach()H Hartley Sweeten2013-04-191-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The I/O region used by this driver is always requested using comedi_request_region(). The devpriv->io union is only used by the common code shared by the legacy and PCI drivers. Use the new comedi_legacy_detach() helper in the (*detach) to release the I/O region requested by this driver. That function will handle the proper sanity checking before releasing the resource. 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>
| * staging: comedi: drivers: use comedi_legacy_detach() in simple driversH Hartley Sweeten2013-04-1919-139/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | Use the new comedi_legacy_detach() helper in the (*detach) to release the I/O region requested by these drivers. Since the (*detach) for these drivers only releases the region, remove the private (*detach) functions and use comedi_legacy_detach() directly for the (*detach). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: comedi: das1800: use comedi_legacy_detach()H Hartley Sweeten2013-04-191-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new comedi_legacy_detach() helper in the (*detach) to release the first I/O region requested by this driver. An additional I/O region is requested for some of the boards this driver supports. The iobase for that region is stored in the private data so that the (*detach) knows it needs to be released. Remove the extra cleanup in the (*attach) that releases the first region. For aesthetics, move the release of the additional region in the (*detach) so it follows the (*attach) order. 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>
| * staging: comedi: das16m1: check for subdev_8255_init() failureH Hartley Sweeten2013-04-191-1/+3
| | | | | | | | | | | | | | | | | | Make sure to check if subdev_8255_init() fails and propogate the error 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>
| * staging: comedi: das16m1: use comedi_legacy_detach()H Hartley Sweeten2013-04-191-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Use the new comedi_legacy_detach() helper in the (*detach) to release the first I/O region requested by this driver. An additional I/O region is requested by this driver for the 8255 device. Save the iobase for that region in the private data so that the (*detach) knows it needs to be released. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: comedi: das16: use comedi_legacy_detach()H Hartley Sweeten2013-04-191-14/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Use the new comedi_legacy_detach() helper in the (*detach) to release the first I/O region requested by this driver. An additional I/O region is requested for some of the boards this driver supports. Save the iobase for that region in the private data so that the (*detach) knows it needs to be released. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>