From c6b004d216d33366498103a960e809ee72c4eaa4 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Thu, 29 May 2014 10:30:04 -0700 Subject: [PATCH] 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 Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- .../comedi/drivers/addi-data/addi_common.h | 3 --- .../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 1a0bafcf983f..0138e00d1522 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 #include -#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 764c8f17f8fa..bfa154d3fea6 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; -- 2.30.2