2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-15 09:03:59 +08:00

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

View File

@ -133,7 +133,8 @@ static int apci3501_read_insn_timer(struct comedi_device *dev,
devpriv->timer_mode != ADDIDATA_WATCHDOG)
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);
return insn->n;