diff options
| author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-11-04 10:53:58 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-07 09:33:58 -0800 |
| commit | e0ca363a3e0beef3b111ff73bdcec1f15bea671c (patch) | |
| tree | 958c4b1153ded5f9ba840d4279e8b5c09c5366c2 | |
| parent | c24ca0e691bd5b8e2e332577a6014de9572b9194 (diff) | |
staging: comedi: addi_apci_3120: remove APCI3120_DISABLE_TIMER[012]
For aesthetics, remove these defines and just use ~APCI3120_ENABLE_TIMER[012].
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>
| -rw-r--r-- | drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c index 71fcaa4fb0c6..3575453afbc9 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c @@ -131,7 +131,6 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY #define APCI3120_TIMER_DISABLE 0 #define APCI3120_TIMER_ENABLE 1 #define APCI3120_ENABLE_TIMER2 0x4000 -#define APCI3120_DISABLE_TIMER2 (~APCI3120_ENABLE_TIMER2) #define APCI3120_ENABLE_TIMER_INT 0x04 #define APCI3120_DISABLE_TIMER_INT (~APCI3120_ENABLE_TIMER_INT) #define APCI3120_WRITE_MODE_SELECT 0x0e @@ -147,9 +146,6 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY #define APCI3120_ENABLE_TIMER0 0x1000 #define APCI3120_ENABLE_TIMER1 0x2000 #define APCI3120_ENABLE_TIMER2 0x4000 -#define APCI3120_DISABLE_TIMER0 (~APCI3120_ENABLE_TIMER0) -#define APCI3120_DISABLE_TIMER1 (~APCI3120_ENABLE_TIMER1) -#define APCI3120_DISABLE_TIMER2 (~APCI3120_ENABLE_TIMER2) #define APCI3120_TIMER2_SELECT_EOS 0xc0 #define APCI3120_COUNTER 3 @@ -1254,10 +1250,10 @@ static irqreturn_t apci3120_interrupt(int irq, void *d) apci3120_interrupt_dma(irq, d); } else { /* Stops the Timer */ - outw(devpriv-> - ctrl & APCI3120_DISABLE_TIMER0 & - APCI3120_DISABLE_TIMER1, - dev->iobase + APCI3120_WR_ADDRESS); + outw(devpriv->ctrl & + ~APCI3120_ENABLE_TIMER0 & + ~APCI3120_ENABLE_TIMER1, + dev->iobase + APCI3120_WR_ADDRESS); } } @@ -1290,7 +1286,7 @@ static int apci3120_config_insn_timer(struct comedi_device *dev, divisor = apci3120_ns_to_timer(dev, 2, data[1], CMDF_ROUND_DOWN); /* Reset gate 2 of Timer 2 to disable it (Set Bit D14 to 0) */ - devpriv->ctrl &= APCI3120_DISABLE_TIMER2; + devpriv->ctrl &= ~APCI3120_ENABLE_TIMER2; outw(devpriv->ctrl, dev->iobase + APCI3120_WR_ADDRESS); /* Disable TIMER Interrupt */ |
