]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
staging: comedi: hwdrv_apci1564: remove magic number in apci1564_timer_insn_read()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 7 Aug 2015 18:45:10 +0000 (11:45 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Aug 2015 01:34:57 +0000 (18:34 -0700)
Use the bit define from addi_tcw.h to remove the magic number.

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>
drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c

index c4650db82f0e18a0fa1673c683c95f05bd9c90a5..a3e3a34d7e86aa4175a88bb9255a7f693d9470f3 100644 (file)
@@ -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);