[PATCH 01/15] staging: comedi: ni_daq_700: remove unnecessary enable and flush of ADC

Ian Abbott abbotti at mev.co.uk
Wed Jul 16 11:35:25 UTC 2014


On 2014-07-15 01:20, H Hartley Sweeten wrote:
> The ADC conversions are enabled and the FIFO is flushed by daq700_ai_config()
> when the driver is initially attached. There is no reason to repeat the ADC
> enable and flush the FIFO before each sample read in the (*insn_read).
>
> Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
> Cc: Ian Abbott <abbotti at mev.co.uk>
> Cc: Greg Kroah-Hartman <gregk at linuxfoundation.org>
> ---
>   drivers/staging/comedi/drivers/ni_daq_700.c | 4 ----
>   1 file changed, 4 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/ni_daq_700.c b/drivers/staging/comedi/drivers/ni_daq_700.c
> index 5e472cb..4d5cb5a 100644
> --- a/drivers/staging/comedi/drivers/ni_daq_700.c
> +++ b/drivers/staging/comedi/drivers/ni_daq_700.c
> @@ -169,11 +169,7 @@ static int daq700_ai_rinsn(struct comedi_device *dev,
>   	/* convert n samples */
>   	for (n = 0; n < insn->n; n++) {
>   		/* trigger conversion with out0 L to H */
> -		outb(0x00, dev->iobase + CMD_R2); /* enable ADC conversions */
>   		outb(0x30, dev->iobase + CMO_R); /* mode 0 out0 L, from H */
> -		outb(0x00, dev->iobase + ADCLEAR_R);	/* clear the ADC FIFO */
> -		/* read 16bit junk from FIFO to clear */
> -		inw(dev->iobase + ADFIFO_R);
>   		/* mode 1 out0 H, L to H, start conversion */
>   		outb(0x32, dev->iobase + CMO_R);
>
>

I wouldn't be comfortable changing that - it looks important.  Could you 
run it past Fred Brooks?

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti at mev.co.uk>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-


More information about the devel mailing list