From 9a2d58c7f87bb5a92b4be9fd61af77baa2c832ba Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Fri, 7 Aug 2015 11:45:09 -0700 Subject: [PATCH] staging: comedi: hwdrv_apci1564: tidy up apci1564_timer_insn_write() Clear the gate and trig bits in the common code path. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c index 3a02eaeee5c8..c4650db82f0e 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c @@ -60,13 +60,12 @@ static int apci1564_timer_insn_write(struct comedi_device *dev, unsigned int ctrl; ctrl = inl(devpriv->timer + ADDI_TCW_CTRL_REG); + ctrl &= ~(ADDI_TCW_CTRL_GATE | ADDI_TCW_CTRL_TRIG); switch (data[1]) { case 0: /* Stop The Timer */ - ctrl &= ~(ADDI_TCW_CTRL_GATE | ADDI_TCW_CTRL_TRIG | - ADDI_TCW_CTRL_ENA); + ctrl &= ~ADDI_TCW_CTRL_ENA; break; case 1: /* Enable the Timer */ - ctrl &= ~(ADDI_TCW_CTRL_GATE | ADDI_TCW_CTRL_TRIG); ctrl |= ADDI_TCW_CTRL_ENA; break; } -- 2.20.1