diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-05-29 17:30:04 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-18 21:39:38 (GMT) |
commit | c6b004d216d33366498103a960e809ee72c4eaa4 (patch) | |
tree | 28cb20ae7e01a9c0238f8dbf3b2c02808257350a /drivers/staging | |
parent | 02dc1e78a238627a0876695b8c84deca78e4435a (diff) | |
download | linux-c6b004d216d33366498103a960e809ee72c4eaa4.tar.xz |
staging: comedi: addi_common.h: remove {LO, HI}WORD macros
These macros don't add any additional clarity to the addi_data drivers.
Just remove them.
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/comedi/drivers/addi-data/addi_common.h | 3 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 16 |
2 files changed, 8 insertions, 11 deletions
diff --git a/drivers/staging/comedi/drivers/addi-data/addi_common.h b/drivers/staging/comedi/drivers/addi-data/addi_common.h index 1a0bafc..0138e00 100644 --- a/drivers/staging/comedi/drivers/addi-data/addi_common.h +++ b/drivers/staging/comedi/drivers/addi-data/addi_common.h @@ -18,9 +18,6 @@ #include <linux/sched.h> #include <linux/interrupt.h> -#define LOWORD(W) (unsigned short)((W) & 0xFFFF) -#define HIWORD(W) (unsigned short)(((W) >> 16) & 0xFFFF) - #define ADDIDATA_EEPROM 1 #define ADDIDATA_NO_EEPROM 0 #define ADDIDATA_93C76 "93C76" diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c index 764c8f1..bfa154d 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c @@ -1051,7 +1051,7 @@ static int apci3120_cyclic_ai(int mode, b_DigitalOutputRegister) & 0xF0) | APCI3120_SELECT_TIMER_2_LOW_WORD; outb(b_Tmp, dev->iobase + APCI3120_TIMER_CRT0); - outw(LOWORD(ui_TimerValue2), + outw(ui_TimerValue2 & 0xffff, dev->iobase + APCI3120_TIMER_VALUE); /* Writing HIGH unsigned short */ @@ -1059,7 +1059,7 @@ static int apci3120_cyclic_ai(int mode, b_DigitalOutputRegister) & 0xF0) | APCI3120_SELECT_TIMER_2_HIGH_WORD; outb(b_Tmp, dev->iobase + APCI3120_TIMER_CRT0); - outw(HIWORD(ui_TimerValue2), + outw((ui_TimerValue2 >> 16) & 0xffff, dev->iobase + APCI3120_TIMER_VALUE); /* (2) Reset FC_TIMER BIT Clearing timer status register */ @@ -1805,7 +1805,7 @@ static int apci3120_config_insn_timer(struct comedi_device *dev, b_DigitalOutputRegister) & 0xF0) | APCI3120_SELECT_TIMER_2_LOW_WORD; outb(b_Tmp, devpriv->iobase + APCI3120_TIMER_CRT0); - outw(LOWORD(ui_Timervalue2), + outw(ui_Timervalue2 & 0xffff, devpriv->iobase + APCI3120_TIMER_VALUE); /* Writing HIGH unsigned short */ @@ -1813,7 +1813,7 @@ static int apci3120_config_insn_timer(struct comedi_device *dev, b_DigitalOutputRegister) & 0xF0) | APCI3120_SELECT_TIMER_2_HIGH_WORD; outb(b_Tmp, devpriv->iobase + APCI3120_TIMER_CRT0); - outw(HIWORD(ui_Timervalue2), + outw((ui_Timervalue2 >> 16) & 0xffff, devpriv->iobase + APCI3120_TIMER_VALUE); /* timer2 in Timer mode enabled */ devpriv->b_Timer2Mode = APCI3120_TIMER; @@ -1841,7 +1841,7 @@ static int apci3120_config_insn_timer(struct comedi_device *dev, b_DigitalOutputRegister) & 0xF0) | APCI3120_SELECT_TIMER_2_LOW_WORD; outb(b_Tmp, devpriv->iobase + APCI3120_TIMER_CRT0); - outw(LOWORD(ui_Timervalue2), + outw(ui_Timervalue2 & 0xffff, devpriv->iobase + APCI3120_TIMER_VALUE); /* Writing HIGH unsigned short */ @@ -1850,7 +1850,7 @@ static int apci3120_config_insn_timer(struct comedi_device *dev, APCI3120_SELECT_TIMER_2_HIGH_WORD; outb(b_Tmp, devpriv->iobase + APCI3120_TIMER_CRT0); - outw(HIWORD(ui_Timervalue2), + outw((ui_Timervalue2 >> 16) & 0xffff, devpriv->iobase + APCI3120_TIMER_VALUE); /* watchdog enabled */ devpriv->b_Timer2Mode = APCI3120_WATCHDOG; @@ -2017,7 +2017,7 @@ static int apci3120_write_insn_timer(struct comedi_device *dev, APCI3120_SELECT_TIMER_2_LOW_WORD; outb(b_Tmp, devpriv->iobase + APCI3120_TIMER_CRT0); - outw(LOWORD(ui_Timervalue2), + outw(ui_Timervalue2 & 0xffff, devpriv->iobase + APCI3120_TIMER_VALUE); /* Writing HIGH unsigned short */ @@ -2026,7 +2026,7 @@ static int apci3120_write_insn_timer(struct comedi_device *dev, APCI3120_SELECT_TIMER_2_HIGH_WORD; outb(b_Tmp, devpriv->iobase + APCI3120_TIMER_CRT0); - outw(HIWORD(ui_Timervalue2), + outw((ui_Timervalue2 >> 16) & 0xffff, devpriv->iobase + APCI3120_TIMER_VALUE); break; |