]>
git.karo-electronics.de Git - karo-tx-linux.git/log
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:21 +0000 (16:04 -0700)]
staging: comedi: addi_apci_3501: use comedi_subdevice 'readback'
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:20 +0000 (16:04 -0700)]
staging: comedi: dt2811: use comedi_subdevice 'readback'
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
For aesthetics, rename the (*insn_write) function and tidy it up.
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>
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:19 +0000 (16:04 -0700)]
staging: comedi: dt9812: use comedi_subdevice 'readback'
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:18 +0000 (16:04 -0700)]
staging: comedi: das6402: use comedi_subdevice 'readback'
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:17 +0000 (16:04 -0700)]
staging: comedi: usbduxsigma: use comedi_subdevice 'readback'
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:16 +0000 (16:04 -0700)]
staging: comedi: usbdux: use comedi_subdevice 'readback'
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:15 +0000 (16:04 -0700)]
staging: comedi: ni_mio_common: use comedi_subdevice 'readback'
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:14 +0000 (16:04 -0700)]
staging: comedi: pcmmio: use comedi_subdevice 'readback'
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:13 +0000 (16:04 -0700)]
staging: comedi: pcmda12: use comedi_subdevice 'readback'
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:12 +0000 (16:04 -0700)]
staging: comedi: ni_at_ao: use comedi_subdevice 'readback'
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:11 +0000 (16:04 -0700)]
staging: comedi: pcl711: use comedi_subdevice 'readback'
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:10 +0000 (16:04 -0700)]
staging: comedi: pcl812: use comedi_subdevice 'readback'
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
For aesthetics, tidy up pcl812_ao_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>
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:09 +0000 (16:04 -0700)]
staging: comedi: s626: use comedi_subdevice 'readback'
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:08 +0000 (16:04 -0700)]
staging: comedi: rti802: use comedi_subdevice 'readback'
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:07 +0000 (16:04 -0700)]
staging: comedi: s526: use comedi_subdevice 'readback'
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
For aesthetics, rename the (*insn_write) function and tidy it up a bit.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:06 +0000 (16:04 -0700)]
staging: comedi: pcl726: use comedi_subdevice 'readback'
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:05 +0000 (16:04 -0700)]
staging: comedi: icp_multi: use comedi_subdevice 'readback'
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
For aesthetics, rename the (*insn_write) function and tidy it up a bit.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:04 +0000 (16:04 -0700)]
staging: comedi: dt282x: use comedi_subdevice 'readback'
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:03 +0000 (16:04 -0700)]
staging: comedi: das16: use comedi_subdevice 'readback'
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:02 +0000 (16:04 -0700)]
staging: comedi: adl_pci9111: use comedi_subdevice 'readback'
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:01 +0000 (16:04 -0700)]
staging: comedi: cb_pcimdda: use comedi_subdevice 'readback'
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Remove the unused private data and its allocation.
For aesthetics, rename the (*insn_write) and (*insn_read) 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>
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:00 +0000 (16:04 -0700)]
staging: comedi: multiq3: use comedi_subdevice 'readback'
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Remove the unused private data and its 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>
H Hartley Sweeten [Mon, 25 Aug 2014 23:03:59 +0000 (16:03 -0700)]
staging: comedi: fl512: use comedi_subdevice 'readback'
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Remove the unused private data and its 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>
H Hartley Sweeten [Mon, 25 Aug 2014 23:03:58 +0000 (16:03 -0700)]
staging: comedi: dac02: use comedi_subdevice 'readback'
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Remove the unused private data and its 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>
H Hartley Sweeten [Mon, 25 Aug 2014 23:03:57 +0000 (16:03 -0700)]
staging: comedi: aio_aio12_8: use comedi_subdevice 'readback'
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Remove the unused private data and its allocation.
For aesthetics, rename the (*insn_write) function and tidy it up.
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>
H Hartley Sweeten [Mon, 25 Aug 2014 23:03:56 +0000 (16:03 -0700)]
staging: comedi: adl_pci6208: use comedi_subdevice 'readback'
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
The loop used to write the values could timeout. Move the saving of
the readback value so that the last value written is always saved.
Remove the unused private data and its 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>
H Hartley Sweeten [Mon, 25 Aug 2014 23:03:55 +0000 (16:03 -0700)]
staging: comedi: skel: use comedi_subdevice 'readback'
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
For aesthetics, rename the (*insn_write) function and tidy it up a bit.
Add a comment about the 'readback' 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>
H Hartley Sweeten [Mon, 25 Aug 2014 23:03:54 +0000 (16:03 -0700)]
staging: comedi: add a 'readback' member to comedi_subdevice
The analog output hardware in most comedi drivers does not provide a
way to readback to last values written to the channels. In order to
provide an (*insn_read) for the analog output subdevice, the comedi
drivers save the last values for each channel in the private data.
Add a new member, 'readback', to the comedi_subdevice definition to
provide a common way to save these values.
Introduce a comedi core function, comedi_alloc_subdev_readback(), to
allocate the memory needed to save the values. This memory will be
automatically kfree'd when the driver is detached.
Introduce a comedi core function, comedi_readback_insn_read(), that
the comedi drivers can use for the (*insn_read) of a subdevice to
return the saved values for each channel.
This will allow removing the boilerplate in the comedi drivers to
return the saved values. In some drivers it will also allow removing
the private data completely.
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>
H Hartley Sweeten [Mon, 25 Aug 2014 22:24:03 +0000 (15:24 -0700)]
staging: comedi: addi_apci_1032: remove deadcode in apci1032_cos_cmdtest()
Reported by: coverity
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>
H Hartley Sweeten [Mon, 25 Aug 2014 22:24:02 +0000 (15:24 -0700)]
staging: comedi: addi_apci_1564: remove deadcode in apci1564_cos_cmdtest()
Reported by: coverity
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>
H Hartley Sweeten [Mon, 25 Aug 2014 22:24:01 +0000 (15:24 -0700)]
staging: comedi: addi_apci_2032: remove deadcode in apci2030_int_cmdtest()
Reported by: coverity
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>
H Hartley Sweeten [Mon, 25 Aug 2014 22:24:00 +0000 (15:24 -0700)]
staging: comedi: amplc_pc236_common: remove deadcode in pc236_intr_cmdtest()
Reported by: coverity
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>
H Hartley Sweeten [Mon, 25 Aug 2014 22:23:59 +0000 (15:23 -0700)]
staging: comedi: comedi_parport: remove deadcode in parport_intr_cmdtest()
Reported by: coverity
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>
H Hartley Sweeten [Mon, 25 Aug 2014 22:23:58 +0000 (15:23 -0700)]
staging: comedi: dt3000: remove deadcode in dt3k_ai_cmdtest()
Reported by: coverity
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>
H Hartley Sweeten [Mon, 25 Aug 2014 22:23:57 +0000 (15:23 -0700)]
staging: comedi: gsc_hpdi: remove deadcode in gsc_hpdi_cmd_test()
Reported by: coverity
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>
H Hartley Sweeten [Mon, 25 Aug 2014 22:23:56 +0000 (15:23 -0700)]
staging: comedi: me4000: fix aref test in ai_write_chanlist()
The 'aref' (CR_AREF) values are all AREF_* defines. The SDF_* defines are
subdevice flags. Fix the test in this function.
Reported by: coverity
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>
H Hartley Sweeten [Mon, 25 Aug 2014 22:23:55 +0000 (15:23 -0700)]
staging: comedi: me4000: fix aref test in me4000_ai_check_chanlist()
The 'aref' (CR_AREF) values are all AREF_* defines. The SDF_* defines are
subdevice flags. Fix the test in this function.
Reported by: coverity
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>
H Hartley Sweeten [Mon, 25 Aug 2014 22:23:54 +0000 (15:23 -0700)]
staging: comedi: ni_6527: remove deadcode in ni6527_intr_cmdtest()
Reported by: coverity
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>
H Hartley Sweeten [Mon, 25 Aug 2014 22:23:53 +0000 (15:23 -0700)]
staging: comedi: ni_65xx: remove deadcode in ni_65xx_intr_cmdtest()
Reported by: coverity
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>
H Hartley Sweeten [Mon, 25 Aug 2014 22:23:52 +0000 (15:23 -0700)]
staging: comedi: ni_mio_common: remove deadcode in ni_cdio_cmdtest()
Reported by: coverity
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>
H Hartley Sweeten [Mon, 25 Aug 2014 22:23:51 +0000 (15:23 -0700)]
staging: comedi: ni_mio_common: remove deadcode in ni_ai_insn_config()
The previous mask by 0xf ensures that calib_source will not be > 0xf.
Remove the dead code.
Reported by: coverity
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>
H Hartley Sweeten [Mon, 25 Aug 2014 22:23:50 +0000 (15:23 -0700)]
staging: comedi: ni_mio_common: fix local var for 32-bit read
The local variable 'd' is used to read a 32-bit register. One branch of
the code shifts the register value 16 bits to the right to get the high
16-bits. Change the type of the local variable so that this shift works
correctly.
Reported by: coverity
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>
H Hartley Sweeten [Mon, 25 Aug 2014 22:23:49 +0000 (15:23 -0700)]
staging: comedi: ni_tiocmd: remove deadcode in ni_tio_cmdtest()
Reported by: coverity
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>
H Hartley Sweeten [Mon, 25 Aug 2014 22:23:48 +0000 (15:23 -0700)]
staging: comedi: usbdux: remove deadcode in pcl726_intr_cmdtest()
Reported by: coverity
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>
H Hartley Sweeten [Mon, 25 Aug 2014 22:23:47 +0000 (15:23 -0700)]
staging: comedi: usbdux: fix errno (EL2NSYNC) check
These should both be checking the -errno.
Reported by: coverity
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>
H Hartley Sweeten [Mon, 25 Aug 2014 22:23:46 +0000 (15:23 -0700)]
staging: comedi: usbduxsigma: fix kcalloc 'size' argument
This code wants to allocate two arrays of struct urb pointers not two
arrays of struct urb objects. The size argument for both kcalloc calls
should be sizeof(urb) not sizeof(*urb).
Reported by: coverity
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>
H Hartley Sweeten [Mon, 25 Aug 2014 22:23:45 +0000 (15:23 -0700)]
staging: comedi: usbduxsigma: fix errno (EL2NSYNC) check
These should both be checking the -errno.
Reported by: coverity
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>
Ian Abbott [Tue, 19 Aug 2014 15:06:33 +0000 (16:06 +0100)]
staging: comedi: ni_labpc: split common code to ni_labpc_common
The "ni_labpc" module is a Comedi driver for the National Instruments
Lab-PC series of ISA data acquistion boards, and also provides common
code for the "ni_labpc_pci" and "ni_labpci_cs" modules (for PCI boards
and PCMCIA cards).
Split out the common code into a new module "ni_labpc_common", leaving
the driver for the ISA boards in the existing "ni_labpc" module. This
removes the C preprocessor conditional directives from the resulting
".c" files (although they remain in the included header file
"ni_labpc_isadma.h").
Unneccessary `#include` directives have been removed from the resulting
".c" files.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 19 Aug 2014 15:06:32 +0000 (16:06 +0100)]
staging: comedi: ni_labpc: break lines after operators
For consistency, break lines before operators, not after.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 19 Aug 2014 15:06:31 +0000 (16:06 +0100)]
staging: comedi: ni_labpc: Logical continuations should be on the previous line
Fix checkpatch issues "CHECK: Logical continuations should be on the
previous line".
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 19 Aug 2014 15:06:30 +0000 (16:06 +0100)]
staging: comedi: ni_labpc: Alignment should match open parenthesis
Fix checkpatch issues "CHECK: Alignment should match open parenthesis".
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 19 Aug 2014 15:06:29 +0000 (16:06 +0100)]
staging: comedi: ni_labpc: use braces on all arms of `if` statement
Fix checkpatch issues "CHECK: braces {} should be used on all arms of
this statement".
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 19 Aug 2014 15:06:28 +0000 (16:06 +0100)]
staging: comedi: ni_labpc: remove unnecessary braces in labpc_common_attach()
Correct checkpatch issue "WARNING: braces {} are not necessary for any
arm of this statement".
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Julia Lawall [Sat, 30 Aug 2014 20:11:37 +0000 (22:11 +0200)]
staging: lustre: adjust spacing within pointer casts
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
type T;
expression e;
@@
(
- T *
+ T *
)
e
// </smpl>
This semantic patch just removes the cast and adds it back, but when it
does so, it follows the spacing conventions of Linux.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chase Southwood [Mon, 18 Aug 2014 03:43:44 +0000 (22:43 -0500)]
staging: comedi: s626: remove unnecessary variable initialization
We initialize 'irqbit' to 0, only to properly set it immediately
afterwards. Just remove the zero-initialization.
Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chase Southwood [Mon, 18 Aug 2014 03:43:02 +0000 (22:43 -0500)]
staging: comedi: dt2801: change function return type to void
cppcheck was complaining that the variable 'stat' is being reassigned
before the old value is used. Upon inspection, I found that
dt2801_writecmd() cannot fail, always returns 0, and most callers already
do not bother with assigning its return value anyway, so it makes sense to
just change the return type for this function from int to void, and remove
the two assignments to 'stat'.
Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chase Southwood [Sun, 17 Aug 2014 04:26:11 +0000 (23:26 -0500)]
staging: comedi: dt3000: remove unneeded variable
Coccinelle (using scripts/coccinelle/tests/doublebitand.cocci) found this
assignment because 0 is or'd twice. Upon inspection, I found that the
variable "mode" is only assigned once and used once, and thus can be
cleanly removed. This patch plugs its value straight into writew() and
then removes the variable.
Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chase Southwood [Sun, 17 Aug 2014 04:25:51 +0000 (23:25 -0500)]
staging: comedi: addi_apci_1564: correct typo in macro definition
A recent commit introduced a typo in the definition of
APCI1564_DO_CC_INT_DISABLE. The macro is not use yet, so not a huge deal,
but this patch corrects it.
Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chase Southwood [Sun, 17 Aug 2014 04:25:16 +0000 (23:25 -0500)]
staging: comedi: addi_apci_1564: add whitespace to subdevice init
For purely aesthetic purposes, add some whitespace to subdevice initialization.
Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eli Billauer [Sat, 16 Aug 2014 15:58:01 +0000 (18:58 +0300)]
staging: xillybus: Removed read barrier at beginning of ISR
The comment (also removed) explains why it was there in the first place, but
that doesn't make much sense.
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eli Billauer [Sat, 16 Aug 2014 15:58:00 +0000 (18:58 +0300)]
staging: xillybus: Removed unnecessary smp_wmb()
These memory barriers were added "just to be safe".
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eli Billauer [Sat, 16 Aug 2014 15:57:59 +0000 (18:57 +0300)]
staging: xillybus: Removed write memory barriers before wait_event_*()
According to Documentation/memory-barriers.txt, a memory barrier is put
in place by wait_event_*()
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eli Billauer [Sat, 16 Aug 2014 15:57:58 +0000 (18:57 +0300)]
staging: xillybus: Removed mmiowb() as iowrite32() is ordered
mmiowb() was used to make sure that iowrite32() take place in the correct
order, which is an unnecessary precuation.
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eli Billauer [Sat, 16 Aug 2014 15:57:57 +0000 (18:57 +0300)]
staging: xillybus: Removed mmiowb() before mutex_unlock()
The relevant sequences consist of two I/O memory writes. The second write
depends on the first one. mmiowb() was inserted to make sure that no other
thread inserts a "first write" before the current one finished its second.
As a mutex protects this critical sequence, mmiowb() is unnecessary.
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eli Billauer [Sat, 16 Aug 2014 15:57:56 +0000 (18:57 +0300)]
staging: xillybus: Remove mmiowb() before wait_event_*() calls
According to Documentation/memory-barriers.txt, a memory barrier is put
in place by wait_event_*()
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Sat, 30 Aug 2014 20:10:25 +0000 (13:10 -0700)]
staging: remove nokia_hp4p driver
The Bluetooth maintainer has been complaining about it for a while, and
I shouldn't have merged it over his objections. There also has been no
real work done on it at all to get it out of the staging tree, so just
delete the code for now.
If someone wants to get this fixed up properly, feel free to revert this
commit and send the revert, along with cleanups and we will be glad to
consider it.
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Pali Rohár <pali.rohar@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>,
Cc: Miguel Oliveira <cmroliv@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andrew Plummer [Fri, 29 Aug 2014 20:50:16 +0000 (21:50 +0100)]
Staging: bcm: LeakyBucket: format kernel-docs
Remove insignificant spaces before tabs in comments.
Signed-off-by: Andrew Plummer <plummer574@gmail.com>
Reviewed-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 11:03:29 +0000 (13:03 +0200)]
Staging: bcm: Bcmnet.c: Renamed variable: "IntfAdapter" -> "intf_ad"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 11:03:31 +0000 (13:03 +0200)]
Staging: bcm: Bcmnet.c: Renamed variable: "psIntfAdapter" -> "intf_ad"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 11:03:30 +0000 (13:03 +0200)]
Staging: bcm: Bcmnet.c: Renamed variable: "Adapter" -> "ad"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 10:58:15 +0000 (12:58 +0200)]
Staging: bcm: Bcmchar.c: Renamed variable: "NOB" -> "nob"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 10:58:14 +0000 (12:58 +0200)]
Staging: bcm: Bcmchar.c: Renamed variable: "pTarang" -> "tarang"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 10:58:13 +0000 (12:58 +0200)]
Staging: bcm: Bcmchar.c: Renamed variable: "stTimeElapsedSinceNetEntry" -> "time_elapsed_since_net_entry"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 10:58:12 +0000 (12:58 +0200)]
Staging: bcm: Bcmchar.c: Renamed variable: "DevInfo" -> "dev_info"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 10:58:11 +0000 (12:58 +0200)]
Staging: bcm: Bcmchar.c: Renamed variable: "RxCntrlMsgBitMask" -> "rx_cntrl_msg_bit_mask"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 10:58:10 +0000 (12:58 +0200)]
Staging: bcm: Bcmchar.c: Renamed variable: "ReadOffset" -> "read_offset"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 10:58:09 +0000 (12:58 +0200)]
Staging: bcm: Bcmchar.c: Renamed variable: "stNVMRead" -> "nvm_read"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 10:58:08 +0000 (12:58 +0200)]
Staging: bcm: Bcmchar.c: Renamed variable: "SectOfset" -> "sect_offset"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 10:58:07 +0000 (12:58 +0200)]
Staging: bcm: Bcmchar.c: Renamed variable: "sCopySectStrut" -> "copy_sect_strut"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 10:58:06 +0000 (12:58 +0200)]
Staging: bcm: Bcmchar.c: Renamed variable: "eFlash2xSectionVal" -> "flash_2x_section_val"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 10:58:05 +0000 (12:58 +0200)]
Staging: bcm: Bcmchar.c: Renamed variable: "psFlash2xBitMap" -> "flash_2x_bit_map"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 10:58:04 +0000 (12:58 +0200)]
Staging: bcm: Bcmchar.c: Renamed variable: "WriteOffset" -> "write_off"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 10:58:03 +0000 (12:58 +0200)]
Staging: bcm: Bcmchar.c: Renamed variable: "InputAddr" -> "input_addr"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 10:58:02 +0000 (12:58 +0200)]
Staging: bcm: Bcmchar.c: Renamed variable: "pWriteBuff" -> "write_buff"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 10:58:01 +0000 (12:58 +0200)]
Staging: bcm: Bcmchar.c: Renamed variable: "WriteBytes" -> "write_bytes"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 10:58:00 +0000 (12:58 +0200)]
Staging: bcm: Bcmchar.c: Renamed variable: "ReadBytes" -> "read_bytes"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 10:57:59 +0000 (12:57 +0200)]
Staging: bcm: Bcmchar.c: Renamed variable: "BuffSize" -> "buff_size"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 10:57:58 +0000 (12:57 +0200)]
Staging: bcm: Bcmchar.c: Renamed variable: "pReadBuff" -> "read_buff"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 10:57:57 +0000 (12:57 +0200)]
Staging: bcm: Bcmchar.c: Renamed variable: "sFlash2xRead" -> "flash_2x_read"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 10:57:56 +0000 (12:57 +0200)]
Staging: bcm: Bcmchar.c: Renamed variable: "pReadData" -> "read_data"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 10:57:55 +0000 (12:57 +0200)]
Staging: bcm: Bcmchar.c: Renamed variable: "stNVMReadWrite" -> "nvm_rw"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 10:57:54 +0000 (12:57 +0200)]
Staging: bcm: Bcmchar.c: Renamed variable: "sUserDebugState" -> "user_debug_state"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 10:57:53 +0000 (12:57 +0200)]
Staging: bcm: Bcmchar.c: Renamed variable: "uiSectorSize" -> "sector_size"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 10:57:52 +0000 (12:57 +0200)]
Staging: bcm: Bcmchar.c: Renamed variable: "uiTempVar" -> "tmp"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 10:57:51 +0000 (12:57 +0200)]
Staging: bcm: Bcmchar.c: Renamed variable: "pBulkBuffer" -> "bulk_buff"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 10:57:50 +0000 (12:57 +0200)]
Staging: bcm: Bcmchar.c: Renamed variable: "uiData" -> "data"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 10:57:49 +0000 (12:57 +0200)]
Staging: bcm: Bcmchar.c: Renamed variable: "uiLoopIndex" -> "i"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 10:57:48 +0000 (12:57 +0200)]
Staging: bcm: Bcmchar.c: Renamed variable: "NVMAccess" -> "nvm_access"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 10:57:47 +0000 (12:57 +0200)]
Staging: bcm: Bcmchar.c: Renamed variable: "psFwInfo" -> "fw_info"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Wed, 27 Aug 2014 10:57:46 +0000 (12:57 +0200)]
Staging: bcm: Bcmchar.c: Renamed variable: "ulSFId" -> "sf_id"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>