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

H Hartley Sweeten hsweeten at visionengravers.com
Tue Jul 15 00:20:58 UTC 2014


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);
 
-- 
1.9.3



More information about the devel mailing list