staging: comedi: hwdrv_apci3501: remove "magic" numbers in apci3501_read_insn_timer()

Use register bit defines from addi_tcw.h to remove the "magic" numbers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
H Hartley Sweeten 2015-08-12 13:25:50 -07:00 committed by Greg Kroah-Hartman
parent 0d5e03079d
commit 1c38d03ea9
1 changed files with 2 additions and 1 deletions

View File

@ -133,7 +133,8 @@ static int apci3501_read_insn_timer(struct comedi_device *dev,
devpriv->timer_mode != ADDIDATA_WATCHDOG) devpriv->timer_mode != ADDIDATA_WATCHDOG)
return -EINVAL; return -EINVAL;
data[0] = inl(devpriv->tcw + ADDI_TCW_STATUS_REG) & 0x1; data[0] = inl(devpriv->tcw + ADDI_TCW_STATUS_REG) &
ADDI_TCW_STATUS_OVERFLOW;
data[1] = inl(devpriv->tcw + ADDI_TCW_VAL_REG); data[1] = inl(devpriv->tcw + ADDI_TCW_VAL_REG);
return insn->n; return insn->n;