Commit 38abe936 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: addi_apci_3120: fix timer 2 disable in apci3120_write_insn_timer()

The wrong define is being used to disable the gate to stop timer 2 in this
function.

Use the apci3120_timer_enable() helper to properly disable the timer.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4ffa00a3
......@@ -1404,9 +1404,7 @@ static int apci3120_write_insn_timer(struct comedi_device *dev,
outb(devpriv->b_ModeSelectRegister,
dev->iobase + APCI3120_WRITE_MODE_SELECT);
/* Reset Gate 2 */
devpriv->ctrl &= APCI3120_DISABLE_TIMER_INT;
outw(devpriv->ctrl, dev->iobase + APCI3120_WR_ADDRESS);
apci3120_timer_enable(dev, 2, false);
/* Reset FC_TIMER BIT */
inb(dev->iobase + APCI3120_TIMER_STATUS_REGISTER);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment