[PATCH 2/2 v2] staging: comedi: addi_apci_1564: fixup and absorb apci1564_reset()

2014-04-15 Thread Chase Southwood
We can remove this function from the boardinfo and move the code from hwdrv_apci1564.c into addi_apci_1564.c since it is the only reset function used by the driver. The function was also messy and failed to reset a few registers, these issues were fixed on the move. Signed-off-by: Chase Southwood

Re: [PATCH 2/2] staging: comedi: addi_apci_1564: fixup and absorb apci1564_reset()

2014-04-15 Thread Chase Southwood
>On Tuesday, April 15, 2014 5:03 AM, Ian Abbott wrote: >>On 2014-04-15 06:54, Chase Southwood wrote: >>We can remove this function from the boardinfo and move the code from >>hwdrv_apci1564.c into addi_apci_1564.c since it is the only reset function >>used by the driver.  The function was also me

Re: [PATCH v7 0/4] Add modules for realtek USB card reader

2014-04-15 Thread Roger
On 04/11/2014 06:36 PM, Oliver Neukum wrote: On Fri, 2014-04-11 at 11:28 +0100, Lee Jones wrote: From: Roger Tseng This patchset adds modules to support Realtek USB vendor specific class flash card reader: one base module in MFD subsystem and two host modules in both mmc and memstick subsystem

Re: [PATCH] Staging:bcm: Fixes coding style issues in drivers/staging/bcm/Qos.c

2014-04-15 Thread Marcos A. Di Pietro
On 04/10/2014 07:56 PM, Greg KH wrote: > On Thu, Apr 10, 2014 at 07:27:27PM -0400, Marcos A. Di Pietro wrote: >>> That's pretty obviously not going to apply properly, you have line-wrapp >>> on. You can't cut-and-paste patches into gmail, see >>> Documentation/email_clients.txt for details. >>> >>

[PATCH] mmc: rtsx: fix possible circular locking dependency

2014-04-15 Thread micky_ching
From: Micky Ching To avoid dead lock, we need make sure host->lock is always acquire before pcr->lock. But in irq handler, we acquired pcr->lock in rtsx mfd driver, and sd_isr_done_transfer() is called during pcr->lock already acquired. Since in sd_isr_done_transfer() the only work we do is schdu

[PATCH] staging: dgrp: Fixed coding style

2014-04-15 Thread Thomas Tanaka
Fixed line width > 80 Signed-off-by: Thomas Tanaka --- drivers/staging/dgrp/dgrp_sysfs.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/dgrp/dgrp_sysfs.c b/drivers/staging/dgrp/dgrp_sysfs.c index 2f9345f..93803e0c 100644 --- a/drivers/staging/dgrp/dgr

Re: [PATCH v3 1/3] Staging: crystalhd: Fix alignement in crystalhd_lnx.c

2014-04-15 Thread Dan Carpenter
All three look great now. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH v3 3/3] Staging: crystalhd: Improve kzalloc calls in crystalhd_lnx.c

2014-04-15 Thread Pascal COMBES
Replace sizeof(type) by sizeof(variable) in crystalhd_lnx.c. Signed-off-by: Pascal COMBES --- diff --git a/drivers/staging/crystalhd/crystalhd_lnx.c b/drivers/staging/crystalhd/crystalhd_lnx.c index 0e432bc..e6fb331 100644 --- a/drivers/staging/crystalhd/crystalhd_lnx.c +++ b/drivers/staging/cry

[PATCH v3 2/3] Staging: crystalhd: Removed cast in crystalhd_lnx.c

2014-04-15 Thread Pascal COMBES
Removed useless (because automatic) cast from void * in crystalhd_lnx.c Signed-off-by: Pascal COMBES --- diff --git a/drivers/staging/crystalhd/crystalhd_lnx.c b/drivers/staging/crystalhd/crystalhd_lnx.c index fd7f08a..0e432bc 100644 --- a/drivers/staging/crystalhd/crystalhd_lnx.c +++ b/drivers/

[PATCH v3 1/3] Staging: crystalhd: Fix alignement in crystalhd_lnx.c

2014-04-15 Thread Pascal COMBES
Signed-off-by: Pascal COMBES --- Description in subject. diff --git a/drivers/staging/crystalhd/crystalhd_lnx.c b/drivers/staging/crystalhd/crystalhd_lnx.c index 20be957..fd7f08a 100644 --- a/drivers/staging/crystalhd/crystalhd_lnx.c +++ b/drivers/staging/crystalhd/crystalhd_lnx.c @@ -112,7 +112

[PATCH 27/49] staging: comedi: cb_pcidas: clarify the ai cmd->start_arg validation

2014-04-15 Thread H Hartley Sweeten
This driver supports two cmd->start_src values, TRIG_NOW and TRIG_EXT. For aesthetics, replace the default case when validating the cmd->start_arg with the proper case statement. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/cb_pcida

[PATCH 33/49] staging: comedi: ni_pcidio: fix the cmd->start_arg use for TRIG_INT

2014-04-15 Thread H Hartley Sweeten
This driver only a cmd->start_src of TRIG_NOW or TRIG_INT. The cmd->start_arg is trivially validated for both sources to be 0. For a TRIG_INT source, the cmd->start_arg is actually the valid trig_num that is passed to the async (*inttrig) callback. Refactor the (*inttrig) function so that the cmd-

[PATCH 14/49] staging: comedi: dmm32at: factor out step 5 of (*do_cmdtest)

2014-04-15 Thread H Hartley Sweeten
Step 5 of the (*do_cmdtest) validates that the chanlist, chan/range/aref/etc, is compatible with the actual hardware. At this point in the (*do_cmdtest) the chanlist is valid, due to checks in the core, so the sanity check is not needed. For aesthetics, factor the step 5 code into a helper functio

[PATCH 49/49] staging: comedi: amplc_pci224: only calc the pacer divisors once

2014-04-15 Thread H Hartley Sweeten
When the cmd->scan_begin_src == TRIG_TIMER the divisors needed to generate the pacer time are calculated in the (*do_cmdtest) to validate the cmd->scan_begin_arg. The core always does the (*do_cmdtest) before the (*do_cmd) so there is no reason to recalc the divisors. Signed-off-by: H Hartley Swee

[PATCH 34/49] staging: comedi: ni_tiocmd: clarify the cmd->start_arg validation and use

2014-04-15 Thread H Hartley Sweeten
This driver supportes cmd->start_src sources of TRIG_NOW, TRIG_INT, TRIG_OTHER, and TRIG_EXT. Refactor the (*do_cmdtest) to clarify the trivial validation of the cmd->start_arg. For a TRIG_INT source, the cmd->start_arg is actually the valid trig_num that is passed to the async (*inttrig) callback.

[PATCH 25/49] staging: comedi: amplc_pci224: fix the ao cmd->start_arg use

2014-04-15 Thread H Hartley Sweeten
This driver supports two cmd->start_src values, TRIG_INT and TRIG_EXT. For TRIG_INT sources, the cmd->start_arg is actually the valid trig_num that is passed to the async (*inttrig) callback. This driver trivially validates the arg for this source to be 0. Refactor the (*inttrig) so that the cmd->

[PATCH 35/49] staging: comedi: ni_labpc: clarify the cmd->start_arg validation

2014-04-15 Thread H Hartley Sweeten
This driver supports cmd->start_src sources of TRIG_NOW and TRIG_EXT. Refactor the (*do_cmdtest) to clarify the trivial validation of the cmd->start_arg. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_labpc.c | 8 +++- 1 file ch

[PATCH 28/49] staging: comedi: cb_pcidas: fix the ao cmd->start_arg use for TRIG_INT

2014-04-15 Thread H Hartley Sweeten
This driver only supports a cmd->start_src of TRIG_INT for ai commands. The cmd->start_arg is trivially validated to be 0. For TRIG_INT source, the cmd->start_arg is actually the valid trig_num that is passed to the async (*inttrig) callback. Refactor the (*inttrig) function so that the cmd->start

[PATCH 30/49] staging: comedi: dt282x: fix the ao cmd->start_arg use for TRIG_INT

2014-04-15 Thread H Hartley Sweeten
This driver only supports a cmd->start_src of TRIG_INT for ao commands. The cmd->start_arg is trivially validated to be 0. For TRIG_INT source, the cmd->start_arg is actually the valid trig_num that is passed to the async (*inttrig) callback. Refactor the (*inttrig) function so that the cmd->start

[PATCH 32/49] staging: comedi: me4000: validate the cmd->start_arg

2014-04-15 Thread H Hartley Sweeten
The cmd->start_arg should be trivially validated in Step 3 of the (*do_cmdtest) functions. Add the necessary code. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me4000.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/st

[PATCH 17/49] staging: comedi: ni_at_a2150: factor out step 5 of (*do_cmdtest)

2014-04-15 Thread H Hartley Sweeten
Step 5 of the (*do_cmdtest) validates that the chanlist, chan/range/aref/etc, is compatible with the actual hardware. At this point in the (*do_cmdtest) the chanlist is valid, due to checks in the core, so the sanity check is not needed. For aesthetics, factor the step 5 code into a helper functio

[PATCH 26/49] staging: comedi: amplc_pci230: fix the ai/ao cmd->start_arg use for TRIG_INT

2014-04-15 Thread H Hartley Sweeten
This driver trivially validates the cmd->start_arg for all cmd->start_src values to be 0. For TRIG_INT source, the cmd->start_arg is actually the valid trig_num that is passed to the async (*inttrig) callback. Refactor the (*inttrig) functions so that the cmd->start_arg is used to check the trig_

[PATCH 45/49] staging: comedi: me4000: remove unnecessary Step 2b test in (*do_cmdtest)

2014-04-15 Thread H Hartley Sweeten
This test is unnecessary. It covers all the possible combinations of the scan_end_src and stop_src triggers so the final else can never be reached. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me4000.c | 11 --- 1 file change

[PATCH 48/49] staging: comedi: amplc_pci224: always cascade the 8254 timers

2014-04-15 Thread H Hartley Sweeten
The 8254 timers are only used in this driver to generate the analog output pacer. To simplify the driver, always cascade the timers. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/amplc_pci224.c | 123 ++ 1 file

[PATCH 20/49] staging: comedi: adl_pci9111: rename local var in pci9111_ai_do_cmd_test()

2014-04-15 Thread H Hartley Sweeten
For aesthetics, rename the local variable 'error' to 'err'. This is the normal name for this local variable in (*do_cmdtest) functions. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adl_pci9111.c | 59 +--- 1 f

[PATCH 37/49] staging: comedi: pcmuio: fix the cmd->start_arg use for TRIG_INT

2014-04-15 Thread H Hartley Sweeten
This driver supports a cmd->start_src of TRIG_NOW or TRIG_INT. The cmd->start_arg is trivially validated for both sources to be 0. For a TRIG_INT source, the cmd->start_arg is actually the valid trig_num that is used by the async (*inttrig) callback. Refactor the (*inttrig) function so that the c

[PATCH 31/49] staging: comedi: gsc_hpdi: validate the cmd->start_arg

2014-04-15 Thread H Hartley Sweeten
The cmd->start_arg should be trivially validated in Step 3 of the (*do_cmdtest) functions. Add the necessary code. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/gsc_hpdi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/st

[PATCH 15/49] staging: comedi: gsc_hpdi: factor out step 5 of (*do_cmdtest)

2014-04-15 Thread H Hartley Sweeten
Step 5 of the (*do_cmdtest) validates that the chanlist, chan/range/aref/etc, is compatible with the actual hardware. At this point in the (*do_cmdtest) the chanlist is valid, due to checks in the core, so the sanity check is not needed. For aesthetics, factor the step 5 code into a helper functio

[PATCH 11/49] staging: comedi: das16m1: factor out step 5 of (*do_cmdtest)

2014-04-15 Thread H Hartley Sweeten
Step 5 of the (*do_cmdtest) validates that the chanlist, chan/range/aref/etc, is compatible with the actual hardware. At this point in the (*do_cmdtest) the chanlist is valid, due to checks in the core, so the sanity check is not needed. For aesthetics, factor the step 5 code into a helper functio

[PATCH 39/49] staging: comedi: usbduxsigma: fix the ai/ao cmd->start_arg use for TRIG_INT

2014-04-15 Thread H Hartley Sweeten
For both ai and ao commands this driver supports a cmd->start_src of TRIG_NOW or TRIG_INT. The cmd->start_arg is trivially validated for both sources to be 0. For a TRIG_INT source, the cmd->start_arg is actually the valid trig_num that is used by the async (*inttrig) callback. Refactor the (*int

[PATCH 44/49] staging: comedi: cb_pcidas64: remove unnecessary Step 2b test in (*do_cmdtest)

2014-04-15 Thread H Hartley Sweeten
This test is unnecessary. The cfc_check_trigger_src() in Step 1 ensures that the trigger source is one of these values and Step 2 makes sure it's only one of these values. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/cb_pcidas64.c |

[PATCH 13/49] staging: comedi: das800: factor out step 5 of (*do_cmdtest)

2014-04-15 Thread H Hartley Sweeten
Step 5 of the (*do_cmdtest) validates that the chanlist, chan/range/aref/etc, is compatible with the actual hardware. At this point in the (*do_cmdtest) the chanlist is valid, due to checks in the core, so the sanity check is not needed. For aesthetics, factor the step 5 code into a helper functio

[PATCH 23/49] staging: comedi: adl_pci9118: fix the ai cmd->start_arg validation and use

2014-04-15 Thread H Hartley Sweeten
This driver supports three cmd->start_src values, TRIG_NOW, TRIG_EXT, and TRIG_INT. TRIG_NOW sources should always have an arg of 0 and arg for TRIG_EXT sources is driver specific. This driver does not use the cmd->start_arg with the TRIG_EXT source so a trivial value of 0 is good. When the cmd->s

[PATCH 47/49] staging: comedi: amplc_pci224: factor out the 'start pacer' code

2014-04-15 Thread H Hartley Sweeten
To clarify the analog output (*do_cmd) function, factor out the code that starts the pacer. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/amplc_pci224.c | 142 +- 1 file changed, 73 insertions(+), 69 deletions(

[PATCH 02/49] staging: comedi: have core check cmd->chanlist_len min

2014-04-15 Thread H Hartley Sweeten
The only time the chanlist can be NULL and chanlist_len < 1 is when a COMEDI_CMDTEST ioctl is done, usually for the comedilib function comedi_get_cmd_src_mask(). This comedilib function sets all the command sources to TRIG_ANY and Step 1 of the (*do_cmdtest) will fail returning a the mask of valid

[PATCH 41/49] staging: comedi: usbdux: fix the cmd->start_arg use

2014-04-15 Thread H Hartley Sweeten
For all cmd->start_src values this driver trivially validates that the cmd->start_arg is 0. For a TRIG_INT source, the cmd->start_arg is actually the valid trig_num that is used by the async (*inttrig) callback. Refactor the (*inttrig) functions so that the cmd->start_arg is used to check the tri

[PATCH 40/49] staging: comedi: usbduxfast: fix the cmd->start_arg validation and use

2014-04-15 Thread H Hartley Sweeten
This driver supports cmd->start_src values of TRIG_NOW, TRIG_EXT, and TRIG_INT. Currently the cmd->start_arg is only validated for TRIG_NOW. For TRIG_EXT sources, the cmd->start_src is driver specific. For a TRIG_INT source, the cmd->start_arg is actually the valid trig_num that is used by the asy

[PATCH 36/49] staging: comedi: pcmmio: fix the cmd->start_arg use for TRIG_INT

2014-04-15 Thread H Hartley Sweeten
This driver supports a cmd->start_src of TRIG_NOW or TRIG_INT. The cmd->start_arg is trivially validated for both sources to be 0. For a TRIG_INT source, the cmd->start_arg is actually the valid trig_num that is used by the async (*inttrig) callback. Refactor the (*inttrig) function so that the c

[PATCH 46/49] staging: comedi: amplc_pci224: remove pci224_cascade_ns_to_timer()

2014-04-15 Thread H Hartley Sweeten
This function is just a wrapper around i8253_cascade_ns_to_timer(). Remove it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/amplc_pci224.c | 24 +++- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/

[PATCH 42/49] staging: comedi: ni_mio_common: clarify the cmd->start_arg validation and use

2014-04-15 Thread H Hartley Sweeten
Clarify the cmd->start_arg validation in Step 3 of the (*do_cmdtest) functions. For a TRIG_INT source, the cmd->start_arg is actually the valid trig_num that is used by the async (*inttrig) callbacks. Refactor the (*inttrig) functions so that the cmd->start_arg is used to check the trig_num inste

[PATCH 38/49] staging: comedi: s626: clarify the cmd->start_arg validation and use

2014-04-15 Thread H Hartley Sweeten
This driver supports a cmd->start_src of TRIG_NOW, TRIG_INT or TRIG_EXT. Clarify the cmd->start_arg validation in Step 3 of the (*do_cmdtest). For a TRIG_INT source, the cmd->start_arg is actually the valid trig_num that is used by the async (*inttrig) callback. Refactor the (*inttrig) function

[PATCH 43/49] staging: comedi: adl_pci911: clarify Step 2b of the (*do_cmdtest)

2014-04-15 Thread H Hartley Sweeten
This step of the (*do_cmdtest) verifies that the selected trigger sources are mutually compatible. For this driver the scan_begin_src must be TRIG_FOLLOW or the same source as the convert_src. Simplify the logic to clarify this. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Ha

[PATCH 04/49] staging: comedi: addi_apci_3xxx: fix ai subdevice 'len_chanlist'

2014-04-15 Thread H Hartley Sweeten
Due to a driver limitation, the (*do_cmdtest) for the analog input subdevice overrides the cmd->chanlist_len to force single channel chanlists. But, the cmd->scan_end_arg was already validated before this happens. Instead of fixing the (*do_cmdtest) just set the subdevice len_chanlist to 1 to limit

[PATCH 18/49] staging: comedi: ni_labpc: cleanup labpc_ai_chanlist_invalid()

2014-04-15 Thread H Hartley Sweeten
This is the Step 5 helper function of the (*do_cmdtest). It validates that the chanlist, chan/range/aref/etc, is compatible with the actual hardware. At this point in the (*do_cmdtest) the chanlist is valid, due to checks in the core, so any sanity checks are not needed. For aesthetics, rename thi

[PATCH 21/49] staging: comedi: comedi_test: ao subdevice does not support async commands

2014-04-15 Thread H Hartley Sweeten
The comedi_subdevices array is kzalloc()'d so the async command callbacks do not need to be set to NULL when the analog output subdevice is initialized. Also, remove the initialzation of the subdevice 'len_chanlist' since this value is only used by the async commands. The core will default it to 1

[PATCH 29/49] staging: comedi: cb_pcidas64: validate the ai/ao cmd->start_arg

2014-04-15 Thread H Hartley Sweeten
The cmd->start_arg should be trivially validated in Step 3 of the (*do_cmdtest) functions. Add the necessary code. For the analog output, a cmd->start_src of TRIG_NOW and TRIG_INT is supported. For both sources the cmd->start_arg is validated to be 0. For a TRIG_INT source, the cmd->start_Arg is a

[PATCH 16/49] staging: comedi: me4000: cleanup ai_check_chanlist()

2014-04-15 Thread H Hartley Sweeten
This is the Step 5 helper function of the (*do_cmdtest). It validates that the chanlist, chan/range/aref/etc, is compatible with the actual hardware. At this point in the (*do_cmdtest) the chanlist is valid, due to checks in the core, so any sanity checks are not needed. For aesthetics, rename thi

[PATCH 03/49] staging: comedi: drivers: properly validate cmd->scan_end_arg

2014-04-15 Thread H Hartley Sweeten
When the async command 'scan_end_src' is TRIG_COUNT the 'scan_end_arg' is the cmd->chanlist_len. The core will initialize the s->len_chanlist to 1 if the driver does not set it. Fix a couple open-coded drivers and make sure they have the s->len_chanlist initialized. Add the necessary check to the

[PATCH 19/49] staging: comedi: ni_mio_common: factor out step 5 of (*do_cmdtest)

2014-04-15 Thread H Hartley Sweeten
Step 5 of the (*do_cmdtest) validates that the chanlist, chan/range/aref/etc, is compatible with the actual hardware. At this point in the (*do_cmdtest) the chanlist is valid, due to checks in the core, so the sanity check is not needed. For aesthetics, factor the step 5 code into a helper functio

[PATCH 12/49] staging: comedi: das1800: factor out step 5 of (*do_cmdtest)

2014-04-15 Thread H Hartley Sweeten
Step 5 of the (*do_cmdtest) validates that the chanlist, chan/range/aref/etc, is compatible with the actual hardware. At this point in the (*do_cmdtest) the chanlist is valid, due to checks in the core, so the sanity check is not needed. For aesthetics, factor the step 5 code into a helper functio

[PATCH 10/49] staging: comedi: das16: factor out step 5 of (*do_cmdtest)

2014-04-15 Thread H Hartley Sweeten
Step 5 of the (*do_cmdtest) validates that the chanlist, chan/range/aref/etc, is compatible with the actual hardware. At this point in the (*do_cmdtest) the chanlist is valid, due to checks in the core, so the sanity check is not needed. For aesthetics, factor the step 5 code into a helper functio

[PATCH 07/49] staging: comedi: amplc_pci230: factor out step 5 of (*do_cmdtest)

2014-04-15 Thread H Hartley Sweeten
Step 5 of the (*do_cmdtest) validates that the chanlist, chan/range/aref/etc, is compatible with the actual hardware. At this point in the (*do_cmdtest) the chanlist is valid, due to checks in the core, so the sanity check is not needed. For aesthetics, factor the step 5 code into a helper functio

[PATCH 09/49] staging: comedi: cb_pcidas64: factor out step 5 of (*do_cmdtest)

2014-04-15 Thread H Hartley Sweeten
Step 5 of the (*do_cmdtest) validates that the chanlist, chan/range/aref/etc, is compatible with the actual hardware. At this point in the (*do_cmdtest) the chanlist is valid, due to checks in the core, so the sanity check is not needed. For aesthetics, factor the step 5 code into a helper functio

[PATCH 24/49] staging: comedi: amplc_dio200_common: fix the cmd->start_arg use

2014-04-15 Thread H Hartley Sweeten
This driver supports two cmd->start_src values, TRIG_NOW and TRIG_INT. TRIG_NOW sources should always have an arg of 0. For TRIG_INT sources, the cmd->start_arg is actually the valid trig_num that is passed to the async (*inttrig) callback. This driver trivially validates the arg for both sources t

[PATCH 01/49] staging: comedi: drivers: core validates chanlist_len max

2014-04-15 Thread H Hartley Sweeten
The comedi core checks if the (cmd->chanlist_len > s->len_chanlist) when the comedi_cmd is copied from user to kernel space by __comedi_get_user_cmd(). If so, the core returns -EINVAL and will not call the subdevice (*do_cmdtest) and (*do_cmd). Remove the unnecessary "max" checks in the comedi dri

[PATCH 22/49] staging: comedi: hwdrv_apci3200: properly validata the ai cmd->start_arg

2014-04-15 Thread H Hartley Sweeten
The async command 'arguments' should be trivially validated in Step 3 of the (*do_cmdtest) not Step 2b. Move the validataion in this driver to the proper place. This driver supports two cmd->start_src values, TRIG_NOW and TRIG_EXT. TRIG_NOW sources should always have an arg of 0. The arg for TRIG_

[PATCH 05/49] staging: comedi: adl_pci9111: factor out step 5 of (*do_cmdtest)

2014-04-15 Thread H Hartley Sweeten
Step 5 of the (*do_cmdtest) validates that the chanlist, chan/range/aref/etc, is compatible with the actual hardware. At this point in the (*do_cmdtest) the chanlist is valid, due to checks in the core, so the sanity check is not needed. For aesthetics, factor the step 5 code into a helper functio

[PATCH 06/49] staging: comedi: amplc_pci224: factor out step 5 of (*do_cmdtest)

2014-04-15 Thread H Hartley Sweeten
Step 5 of the (*do_cmdtest) validates that the chanlist, chan/range/aref/etc, is compatible with the actual hardware. At this point in the (*do_cmdtest) the chanlist is valid, due to checks in the core, so the sanity check is not needed. For aesthetics, factor the step 5 code into a helper functio

[PATCH 08/49] staging: comedi: cb_pcidas: factor out step 5 of (*do_cmdtest)

2014-04-15 Thread H Hartley Sweeten
Step 5 of the (*do_cmdtest) validates that the chanlist, chan/range/aref/etc, is compatible with the actual hardware. At this point in the (*do_cmdtest) the chanlist is valid, due to checks in the core, so the sanity check is not needed. For aesthetics, factor the step 5 code into a helper functio

[PATCH 00/49] staging: comedi: start cleaning up the async commands

2014-04-15 Thread H Hartley Sweeten
Async commands are passed from user space to the drivers by the comedi core. The triggers and arguments for the command is passed in a struct comedi_cmd that is initially validated by the core then validated by the drivers in the subdevice (*do_cmdtest) function. If the validation succeeds, the com

Re: [PATCH RESEND 1/2] staging: binder: add __user annotation in binder.c

2014-04-15 Thread Dan Carpenter
On Tue, Apr 15, 2014 at 02:04:50PM +0200, Mathieu Maret wrote: > Dan Carpenter wrote: > > This is the first time you have sent it to the list, it's not a RESEND. > > > The first one was only on the linux-kernel mailing list. Oh. No one reads lkml. It's just for the google archive. regards, dan

Re: [PATCH RESEND 1/2] staging: binder: add __user annotation in binder.c

2014-04-15 Thread Mathieu Maret
Dan Carpenter wrote: > This is the first time you have sent it to the list, it's not a RESEND. > The first one was only on the linux-kernel mailing list. May be, that's why you did not get it. As it was just before the 3.14 release, I was asked to resend latter. Is it the expected meaning of the

Re: [PATCH 02/06] staging: dgap: Only read config file dgap.conf once

2014-04-15 Thread Mark Hounschell
On 04/15/2014 06:01 AM, Dan Carpenter wrote: > On Mon, Apr 14, 2014 at 03:17:19PM -0400, Mark Hounschell wrote: >> On 04/14/2014 11:49 AM, Greg Kroah-Hartman wrote: >>> On Tue, Mar 25, 2014 at 04:38:14PM -0400, Mark Hounschell wrote: The config file is currently read for each board found.

Re: [PATCH RESEND 2/2] staging: binder: Code simplification

2014-04-15 Thread Dan Carpenter
On Tue, Apr 15, 2014 at 12:03:06PM +0200, Mathieu Maret wrote: > Remove duplicate code > The original code is simpler actually. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/

Re: [PATCH RESEND 1/2] staging: binder: add __user annotation in binder.c

2014-04-15 Thread Dan Carpenter
This is the first time you have sent it to the list, it's not a RESEND. Patch looks ok. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH RESEND 2/2] staging: binder: Code simplification

2014-04-15 Thread Mathieu Maret
Remove duplicate code Signed-off-by: Mathieu Maret --- drivers/staging/android/binder.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c index 3dca577..c29c3c7 100644 --- a/drivers/staging/android/binde

Re: [PATCH 2/2] staging: comedi: addi_apci_1564: fixup and absorb apci1564_reset()

2014-04-15 Thread Ian Abbott
On 2014-04-15 06:54, Chase Southwood wrote: We can remove this function from the boardinfo and move the code from hwdrv_apci1564.c into addi_apci_1564.c since it is the only reset function used by the driver. The function was also messy and failed to reset a few registers, these issues were fixe

[PATCH RESEND 1/2] staging: binder: add __user annotation in binder.c

2014-04-15 Thread Mathieu Maret
Add __user to binder_version to correct sparse warning. Reduce line size to fit to coding style. Signed-off-by: Mathieu Maret --- drivers/staging/android/binder.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/staging/android/binder.c b/drivers/staging/androi

Re: [PATCH 02/06] staging: dgap: Only read config file dgap.conf once

2014-04-15 Thread Dan Carpenter
On Mon, Apr 14, 2014 at 03:17:19PM -0400, Mark Hounschell wrote: > On 04/14/2014 11:49 AM, Greg Kroah-Hartman wrote: > > On Tue, Mar 25, 2014 at 04:38:14PM -0400, Mark Hounschell wrote: > >> The config file is currently read for each board found. > >> It only needs to be read one time. The buffer i

Re: [PATCH 1/2] staging: comedi: addi_apci_1564: remove use of devpriv->iobase

2014-04-15 Thread Ian Abbott
On 2014-04-15 06:53, Chase Southwood wrote: devpriv->iobase is currently being used to hold the iobase address used to read/write the board's registers. The same address is stored in the comedi_device dev->iobase. We use that instead. The eventual goal is to decrease the driver's use of the st