[PATCH v3 1/7] staging: comedi: comedi_pci: introduce comedi_pci_detach()

2014-08-25 Thread H Hartley Sweeten
Introduce a generic (*detach) function for comedi PCI drivers to handle the boilerplate code needed to detach a PCI driver. This function works similar to comedi_legacy_detach() where it will: * free the dev->irq if it has been requested * iounmap the dev->mmio addres if it has been ioremap'e

[PATCH v3 4/7] staging: comedi: s626: tidy up freeing of the dma buffers

2014-08-25 Thread H Hartley Sweeten
Currently the dma buffers are freed during the detach of the driver using the function s626_close_dma_b(). The buffers are also freed while the interrupt handler is still attached. This could result in a race condition. Refactor the code so that the buffers are freed after the interrupt handler is

[PATCH v3 3/7] staging: comedi: icp_multi: remove 'valid' member from private data

2014-08-25 Thread H Hartley Sweeten
This member is set at the end of the driver attach and is only used to verify that icp_multi_reset() can be called in the (*detach). The only requirement for icp_multi_reset() to work is that the dev->mmio is valid. Remove the 'valid' member from the private data and use 'dev->mmio' to see if the

[PATCH v3 5/7] staging: comedi: s626: use comedi_pci_detach()

2014-08-25 Thread H Hartley Sweeten
Use comedi_pci_detach() to handle the boilerplate part of the (*detach) for this PCI driver. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/s626.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/stagin

[PATCH v3 7/7] staging: comedi: gsc_hpdi: tidy up freeing of the dma buffers

2014-08-25 Thread H Hartley Sweeten
Factor the freeing of the dma buffers out of the (*detach). Move the freeing of the buffers so that it occurs after the PCI device has been disabled to avoid any race condition. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/gsc_hpdi.

[PATCH v3 2/7] staging: comedi: adv_pci_dio: remove 'valid' member from private data

2014-08-25 Thread H Hartley Sweeten
This member is set at the end of the driver attach and is only used to verify that pci_dio_reset() can be called in the (*detach). The only requirement for pci_dio_reset() to work is that the dev->iobase is valid. Remove the 'valid' member from the private data and use 'dev->iobase' to see if the

[PATCH v3 0/7] staging: comedi: cleanup PCI driver detach

2014-08-25 Thread H Hartley Sweeten
Introduce a new helper function, comedi_pci_detach(), that can be used as the (*detach) of a comedi PCI driver to handle the boilerplate code of the PCI driver detach. Use the the new helper to remove the boilerplate from most of the comedi PCI drivers. Some of the drivers need additional cleanup

[PATCH v3 6/7] staging: comedi: cb_pcidas64: tidy up freeing of the dma buffers

2014-08-25 Thread H Hartley Sweeten
Factor the freeing of the dma buffers out of the (*detach). Move the freeing of the buffers so that it occurs after the PCI device has been disabled to avoid any race condition. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/cb_pcidas

[PATCH 50/62] staging: comedi: dmm32at: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/dmm32at.c | 33

[PATCH 08/62] staging: comedi: cb_pcimdda: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc

[PATCH 33/62] staging: comedi: ni_atmio16d: cleanup atmio16d_ao_insn_write()

2014-08-25 Thread H Hartley Sweeten
The comedi core validates the insn->chanspec and data values before calling the (*insn_write) functions. The 'chan' will always be valid. Tidy up this function up a bit and remove the unnecessary code. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/

[PATCH 38/62] staging: comedi: ii_pci20kc: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/driv

[PATCH 58/62] staging: comedi: cb_pcidas64: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/cb_pcidas64.c | 22 +++--- 1 fil

[PATCH 46/62] staging: comedi: rti800: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/rti800.c | 26 +++--- 1 file

[PATCH 53/62] staging: comedi: cb_pcimdas: cleanup cb_pcimdas_ao_winsn()

2014-08-25 Thread H Hartley Sweeten
The comedi core validates the insn->chanspec and data values before calling the (*insn_write) functions. The 'chan' will always be valid and the data values do not need to be masked. Tidy up this function and remove the unnecessary code. For aesthetics, rename the function. Signed-off-by: H Hart

[PATCH 28/62] staging: comedi: addi_apci_3501: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi_apci_3501.c | 19 +-- 1 fil

[PATCH 31/62] staging: comedi: amplc_pci230: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/stag

[PATCH 47/62] staging: comedi: daqboard2000: remove #if 0'ed out code in ao (*insn_write)

2014-08-25 Thread H Hartley Sweeten
This code has been disabled since it's initial commit. It must not be needed so just remove it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/daqboard2000.c | 16 1 file changed, 16 deletions(-) diff --git a/drivers/

[PATCH 57/62] staging: comedi: cb_pcidas: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/cb_pcidas.c | 30 +++---

[PATCH 30/62] staging: comedi: amplc_pci224: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/stag

[PATCH 51/62] staging: comedi: ni_670x: cleanup ni_670x_ao_winsn()

2014-08-25 Thread H Hartley Sweeten
For aesthetics, rename this function and tidy it up a bit. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_670x.c | 40 +--- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/drivers/staging/

[PATCH 05/62] staging: comedi: dac02: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/driv

[PATCH 35/62] staging: comedi: me_daq: fix bug in me_ao_insn_write()

2014-08-25 Thread H Hartley Sweeten
The comedi core expects (*insn_write) functions to write insn->n values to the hardware and return the number of values written. Currently, this function only writes the first value. The core also validates all the data values so the extra masking with s->maxdata is not needed. Fix this function t

[PATCH 61/62] staging: comedi: me4000: remove sanity checks in me4000_ao_insn_write()

2014-08-25 Thread H Hartley Sweeten
The comedi core does the sanity checking of the comedi_insn before calling the (*insn_write). Remove the unnecessary checks. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me4000.c | 33 ++--- 1 file changed

[PATCH 48/62] staging: comedi: daqboard2000: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 the (*insn_write) a bit. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/driver

[PATCH 44/62] staging: comedi: das08: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
Use the new comedi_subdevice 'readback' member and the core provided (*insn_read) for the readback of the analog output subdevice channels. The das08_ao_initialize() function is only called when the subdevice is first setup during the attach. It is used to initialize the channels to a known state.

[PATCH 45/62] staging: comedi: rti800: save unmunged data for ao readback

2014-08-25 Thread H Hartley Sweeten
The unmunged data should be saved for readback not the munged data. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/rti800.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/rti8

[PATCH 56/62] staging: comedi: mf6x4: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/mf6x4.c | 27 +++ 1 file

[PATCH 17/62] staging: comedi: pcl812: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers

[PATCH 39/62] staging: comedi: dt3000: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- driver

[PATCH 22/62] staging: comedi: ni_mio_common: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_mio_common.c | 25 +++--

[PATCH 26/62] staging: comedi: dt9812: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/dt9812.c | 27 --- 1 fil

[PATCH 42/62] staging: comedi: pcl818: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 33 +++--

[PATCH 52/62] staging: comedi: ni_670x: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_670x.c | 26 +++--- 1 fil

[PATCH 36/62] staging: comedi: me_daq: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me_daq.c | 26 +++--- 1 file

[PATCH 49/62] staging: comedi: dmm32at: cleanup dmm32at_ao_winsn()

2014-08-25 Thread H Hartley Sweeten
For aesthetics, rename the function and tidy it up a bit. Also rename the registers used by this function and add a macro to set the 'chan' bits in the MSB data register. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/dmm32at.c | 44 ++

[PATCH 54/62] staging: comedi: cb_pcimdas: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/cb_pcimdas.c | 29 +++--

[PATCH 03/62] staging: comedi: adl_pci6208: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 priv

[PATCH 40/62] staging: comedi: quatech_daqp_cs: fix bug in daqp_ao_insn_write()

2014-08-25 Thread H Hartley Sweeten
The comedi core expects (*insn_write) functions to write insn->n values to the hardware and return the number of values written. Currently, this function only writes the first value. Fix it to work like the core expects. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --

[PATCH 41/62] staging: comedi: quatech_daqp_cs: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/quatech_daqp_cs.c | 7 +++ 1 file changed, 7

[PATCH 23/62] staging: comedi: usbdux: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbdux.c | 25 - 1 file

[PATCH 37/62] staging: comedi: ii_pci20kc: save unmunged data for ao readback

2014-08-25 Thread H Hartley Sweeten
The unmunged data should be saved for readback not the munged data. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ii_pci20kc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/ii

[PATCH 62/62] staging: comedi: me4000: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me4000.c | 30 ++ 1

[PATCH 19/62] staging: comedi: ni_at_ao: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_at_ao.c | 35 +--

[PATCH 60/62] staging: comedi: rtd520: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/rtd520.c | 26 ++ 1 file

[PATCH 59/62] staging: comedi: dt2801: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/dt2801.c | 28 ++-- 1 fi

[PATCH 18/62] staging: comedi: pcl711: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl711.c | 27 +++ 1 fil

[PATCH 21/62] staging: comedi: pcmmio: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcmmio.c | 29 +++-- 1 f

[PATCH 15/62] staging: comedi: rti802: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/rti802.c | 29 - 1 f

[PATCH 43/62] staging: comedi: das08: fix bug in das08_ao_winsn()

2014-08-25 Thread H Hartley Sweeten
The comedi core expects (*insn_write) functions to write insn->n values to the hardware and return the number of values written. Currently, this function only writes the first value. Fix it to work like the core expects. For aesthetics, rename the function and tidy it up a bit. Signed-off-by: H

[PATCH 29/62] staging: comedi: cb_das16_cs: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/driv

[PATCH 55/62] staging: comedi: mf6x4: analog output data does not need extra masking

2014-08-25 Thread H Hartley Sweeten
The comedi core validates that all the data values are <= s->maxdata before calling the (*insn_write) function. The extra masking is not needed. Remove it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/mf6x4.c | 8 1 file cha

[PATCH 24/62] staging: comedi: usbduxsigma: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbduxsigma.c | 22 ++ 1 fil

[PATCH 13/62] staging: comedi: pcl726: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl726.c | 29 - 1 f

[PATCH 20/62] staging: comedi: pcmda12: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcmda12.c | 16 +++- 1 file changed,

[PATCH 34/62] staging: comedi: ni_atmio16d: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_atmio16d.c | 23 +++ 1 fi

[PATCH 11/62] staging: comedi: dt282x: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/dt282x.c | 31 --- 1

[PATCH 25/62] staging: comedi: das6402: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das6402.c | 14 ++ 1 file changed, 6

[PATCH 27/62] staging: comedi: dt2811: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/stag

[PATCH 16/62] staging: comedi: s626: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/s626.c | 41 +++

[PATCH 32/62] staging: comedi: addi_apci_3xxx: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi_apci_3xxx.c | 11 ++- 1 file change

[PATCH 09/62] staging: comedi: adl_pci9111: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adl_pci9111.c | 28

[PATCH 06/62] staging: comedi: fl512: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/driv

[PATCH 00/62] staging: comedi: cleanup analog output 'readback'

2014-08-25 Thread H Hartley Sweeten
The hardware for the analog output subdevices is normally write-only. In order to provide a 'readback' mechanism the last values written to the analog output channels is cached in the private data of the comedi driver. This allows the user to do an (*insn_read) operation to get back the last values

[PATCH 02/62] staging: comedi: skel: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian

[PATCH 12/62] staging: comedi: icp_multi: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- driver

[PATCH 07/62] staging: comedi: multiq3: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/driv

[PATCH 14/62] staging: comedi: s526: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- driver

[PATCH 01/62] staging: comedi: add a 'readback' member to comedi_subdevice

2014-08-25 Thread H Hartley Sweeten
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, 'readbac

[PATCH 10/62] staging: comedi: das16: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das16.c | 11 +-- 1 file changed, 9 inse

[PATCH 04/62] staging: comedi: aio_aio12_8: use comedi_subdevice 'readback'

2014-08-25 Thread H Hartley Sweeten
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 Cc: I

[PATCH 18/19] staging: comedi: addi_apci_1564: remove deadcode in apci1564_cos_cmdtest()

2014-08-25 Thread H Hartley Sweeten
Reported by: coverity Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi_apci_1564.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi_apci_1564.c b/drivers/staging/comedi/

[PATCH 09/19] staging: comedi: ni_65xx: remove deadcode in ni_65xx_intr_cmdtest()

2014-08-25 Thread H Hartley Sweeten
Reported by: coverity Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_65xx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_65xx.c b/drivers/staging/comedi/drivers/ni_65xx.c

[PATCH 04/19] staging: comedi: usbdux: remove deadcode in pcl726_intr_cmdtest()

2014-08-25 Thread H Hartley Sweeten
Reported by: coverity Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl726.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl726.c b/drivers/staging/comedi/drivers/pcl726.c

[PATCH 19/19] staging: comedi: addi_apci_1032: remove deadcode in apci1032_cos_cmdtest()

2014-08-25 Thread H Hartley Sweeten
Reported by: coverity Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi_apci_1032.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi_apci_1032.c b/drivers/staging/comedi/

[PATCH 16/19] staging: comedi: amplc_pc236_common: remove deadcode in pc236_intr_cmdtest()

2014-08-25 Thread H Hartley Sweeten
Reported by: coverity Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/amplc_pc236_common.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/comedi/drivers/amplc_pc236_common.c b/drivers/staging

[PATCH 02/19] staging: comedi: usbduxsigma: fix kcalloc 'size' argument

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/

[PATCH 13/19] staging: comedi: gsc_hpdi: remove deadcode in gsc_hpdi_cmd_test()

2014-08-25 Thread H Hartley Sweeten
Reported by: coverity Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/gsc_hpdi.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/gsc_hpdi.c b/drivers/staging/comedi/drivers/gsc_hp

[PATCH 01/19] staging: comedi: usbduxsigma: fix errno (EL2NSYNC) check

2014-08-25 Thread H Hartley Sweeten
These should both be checking the -errno. Reported by: coverity Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbduxsigma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/usbduxs

[PATCH 06/19] staging: comedi: ni_mio_common: fix local var for 32-bit read

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott

[PATCH 08/19] staging: comedi: ni_mio_common: remove deadcode in ni_cdio_cmdtest()

2014-08-25 Thread H Hartley Sweeten
Reported by: coverity Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_mio_common.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/driv

[PATCH 05/19] staging: comedi: ni_tiocmd: remove deadcode in ni_tio_cmdtest()

2014-08-25 Thread H Hartley Sweeten
Reported by: coverity Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_tiocmd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_tiocmd.c b/drivers/staging/comedi/drivers/ni_ti

[PATCH 17/19] staging: comedi: addi_apci_2032: remove deadcode in apci2030_int_cmdtest()

2014-08-25 Thread H Hartley Sweeten
Reported by: coverity Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi_apci_2032.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi_apci_2032.c b/drivers/staging/comedi/dri

[PATCH 00/19] staging: comedi: fix some coverity scan issues

2014-08-25 Thread H Hartley Sweeten
This series fixes a number of issues reported by coverity. H Hartley Sweeten (19): staging: comedi: usbduxsigma: fix errno (EL2NSYNC) check staging: comedi: usbduxsigma: fix kcalloc 'size' argument staging: comedi: usbdux: fix errno (EL2NSYNC) check staging: comedi: usbdux: remove deadcode

[PATCH 11/19] staging: comedi: me4000: fix aref test in me4000_ai_check_chanlist()

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me4000.c | 2 +- 1 file changed, 1 insertion

[PATCH 15/19] staging: comedi: comedi_parport: remove deadcode in parport_intr_cmdtest()

2014-08-25 Thread H Hartley Sweeten
Reported by: coverity Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/comedi_parport.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/comedi/drivers/comedi_parport.c b/drivers/staging/comedi/

[PATCH 03/19] staging: comedi: usbdux: fix errno (EL2NSYNC) check

2014-08-25 Thread H Hartley Sweeten
These should both be checking the -errno. Reported by: coverity Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbdux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/usbdux.c b/

[PATCH 07/19] staging: comedi: ni_mio_common: remove deadcode in ni_ai_insn_config()

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_mio_common.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/driv

[PATCH 14/19] staging: comedi: dt3000: remove deadcode in dt3k_ai_cmdtest()

2014-08-25 Thread H Hartley Sweeten
Reported by: coverity Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/dt3000.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/dt3000.c b/drivers/staging/comedi/drivers/dt3000.c index 56e21cc..96a25a

[PATCH 12/19] staging: comedi: me4000: fix aref test in ai_write_chanlist()

2014-08-25 Thread H Hartley Sweeten
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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me4000.c | 2 +- 1 file changed, 1 insertion

[PATCH 10/19] staging: comedi: ni_6527: remove deadcode in ni6527_intr_cmdtest()

2014-08-25 Thread H Hartley Sweeten
Reported by: coverity Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_6527.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_6527.c b/drivers/staging/comedi/drivers/ni_6527.c

RE: [hyperv] BUG at drivers/hv/channel.c:462 while changing MTU

2014-08-25 Thread KY Srinivasan
> -Original Message- > From: Sitsofe Wheeler [mailto:sits...@gmail.com] > Sent: Monday, August 25, 2014 2:43 PM > To: Dan Carpenter > Cc: KY Srinivasan; Greg Kroah-Hartman; Jason Wang; linux- > ker...@vger.kernel.org; David S. Miller; Daniel Borkmann; > net...@vger.kernel.org; de...@linux

Re: [hyperv] BUG at drivers/hv/channel.c:462 while changing MTU

2014-08-25 Thread Sitsofe Wheeler
On Mon, Aug 25, 2014 at 12:36:48PM +0300, Dan Carpenter wrote: > The code here is: > > drivers/hv/channel.c >460 BUG_ON(ret != 0); >461 t = wait_for_completion_timeout(&info->waitevent, 5*HZ); >462 BUG_ON(t == 0); > There is also a case of the BUG_ON at lin

[PATCH RESEND] staging: r8188eu: Add new USB ID

2014-08-25 Thread Larry Finger
The Elecom WDC-150SU2M uses this chip. Reported-by: Hiroki Kondo Signed-off-by: Larry Finger --- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c index 264e6

Re: staging: dgnc: Fix frame size is larger than 1024B

2014-08-25 Thread Konrad Zapalowicz
On 08/25, Dan Carpenter wrote: > Hello Konrad Zapalowicz, > > The patch ea6e9dea2e72: "staging: dgnc: Fix frame size is larger than > 1024B" from Aug 6, 2014, leads to the following static checker > warning: > > drivers/staging/dgnc/dgnc_tty.c:479 dgnc_sniff_nowait_nolock() > error: s

[PATCH] staging: android: sw_sync.c: fix new line style issues

2014-08-25 Thread Koray Gulcu
Add two new lines that are missing after declerations as detected by checkpatch.pl Signed-off-by: Koray Gulcu --- drivers/staging/android/sw_sync.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/android/sw_sync.c b/drivers/staging/android/sw_sync.c index a76db3f..863d

RE: BUG: unable to handle kernel paging request at ffff8801f3febe63 (netvsc_select_queue)

2014-08-25 Thread KY Srinivasan
> -Original Message- > From: Sitsofe Wheeler [mailto:sits...@gmail.com] > Sent: Monday, August 25, 2014 11:48 AM > To: KY Srinivasan > Cc: Daniel Borkmann; David Miller; Haiyang Zhang; > de...@linuxdriverproject.org; net...@vger.kernel.org; linux- > ker...@vger.kernel.org; Jesper Dangaard

Re: BUG: unable to handle kernel paging request at ffff8801f3febe63 (netvsc_select_queue)

2014-08-25 Thread Sitsofe Wheeler
On Tue, Aug 19, 2014 at 12:40:53PM +0100, Sitsofe Wheeler wrote: > On Tue, Aug 19, 2014 at 10:57:30AM +0200, Daniel Borkmann wrote: > > On 08/19/2014 10:15 AM, Sitsofe Wheeler wrote: > > >After a variety of issues on Hyper-V (host is running Windows 2012 R2) I > > >updated to the latest kernel (3.1

RE: [hyperv] BUG at drivers/hv/channel.c:462 while changing MTU

2014-08-25 Thread KY Srinivasan
> -Original Message- > From: Greg Kroah-Hartman [mailto:gre...@linuxfoundation.org] > Sent: Monday, August 25, 2014 10:50 AM > To: KY Srinivasan > Cc: Dan Carpenter; Sitsofe Wheeler; Jason Wang; linux- > ker...@vger.kernel.org; David S. Miller; Daniel Borkmann; > net...@vger.kernel.org; d

Re: [hyperv] BUG at drivers/hv/channel.c:462 while changing MTU

2014-08-25 Thread Greg Kroah-Hartman
On Mon, Aug 25, 2014 at 05:34:27PM +, KY Srinivasan wrote: > > > > -Original Message- > > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > > Sent: Monday, August 25, 2014 2:37 AM > > To: Sitsofe Wheeler > > Cc: KY Srinivasan; Greg Kroah-Hartman; Jason Wang; linux- > > ker...@vg

  1   2   >