aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH Hartley Sweeten <[email protected]>2015-08-07 11:45:10 -0700
committerGreg Kroah-Hartman <[email protected]>2015-08-14 18:34:57 -0700
commit18543b13fc99f0e90aead12ca9fc64145341278c (patch)
tree72cd3157ca485c87d08af846142356edc9d30a5b
parent9a2d58c7f87bb5a92b4be9fd61af77baa2c832ba (diff)
staging: comedi: hwdrv_apci1564: remove magic number in apci1564_timer_insn_read()
Use the bit define from addi_tcw.h to remove the magic number. 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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c
index c4650db82f0e..a3e3a34d7e86 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c
@@ -82,7 +82,8 @@ static int apci1564_timer_insn_read(struct comedi_device *dev,
struct apci1564_private *devpriv = dev->private;
/* Stores the status of the Timer */
- data[0] = inl(devpriv->timer + ADDI_TCW_STATUS_REG) & 0x1;
+ data[0] = inl(devpriv->timer + ADDI_TCW_STATUS_REG) &
+ ADDI_TCW_STATUS_OVERFLOW;
/* Stores the Actual value of the Timer */
data[1] = inl(devpriv->timer + ADDI_TCW_VAL_REG);