staging: comedi: addi_common.h: remove {LO, HI}WORD macros
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 29 May 2014 17:30:04 +0000 (10:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jun 2014 21:39:38 +0000 (14:39 -0700)
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>
drivers/staging/comedi/drivers/addi-data/addi_common.h
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c

index 1a0bafc..0138e00 100644 (file)
@@ -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"
index 764c8f1..bfa154d 100644 (file)
@@ -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;