diff options
author | H Hartley Sweeten <[email protected]> | 2015-08-07 11:45:13 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2015-08-14 18:34:57 -0700 |
commit | c6288a3bebd8a59364f9ca9871f0fd2ac11963b4 (patch) | |
tree | 44911aa947ab204e8e1ba42d787bce95c52afa0b | |
parent | 1f5d767fab593659cbebc91197c3f182f6e0d84a (diff) |
staging: comedi: hwdrv_apci1564: tidy up apci1564_counter_insn_write()
Clear the gate and trig bits in the common code path.
Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r-- | drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c | 3 |
1 files changed, 1 insertions, 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 dc738b26c60a..1315554fb096 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; } |