Clear the gate and trig bits in the common code path. Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx> Cc: Ian Abbott <abbotti@xxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c index dc738b2..1315554 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c @@ -147,16 +147,15 @@ static int apci1564_counter_insn_write(struct comedi_device *dev, unsigned int ctrl; ctrl = inl(iobase + ADDI_TCW_CTRL_REG); + ctrl &= ~(ADDI_TCW_CTRL_GATE | ADDI_TCW_CTRL_TRIG); switch (data[1]) { case 0: /* Stops the Counter subdevice */ ctrl = 0; break; case 1: /* Start the Counter subdevice */ - ctrl &= ~(ADDI_TCW_CTRL_GATE | ADDI_TCW_CTRL_TRIG); ctrl |= ADDI_TCW_CTRL_ENA; break; case 2: /* Clears the Counter subdevice */ - ctrl &= ~(ADDI_TCW_CTRL_GATE | ADDI_TCW_CTRL_TRIG); ctrl |= ADDI_TCW_CTRL_GATE; break; } -- 2.4.3 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel