From babf0ede302697486a6633e72d051bbb8e31e2b2 Mon Sep 17 00:00:00 2001 From: Bill Pemberton Date: Wed, 25 Mar 2009 11:04:58 -0400 Subject: Staging: comedi: Remove WORD and *PWORD typedefs in addi-data Signed-off-by: Bill Pemberton Signed-off-by: Greg Kroah-Hartman diff --git a/drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.c b/drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.c index 007ae8c..3ea2f07 100644 --- a/drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.c +++ b/drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.c @@ -52,23 +52,23 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc /*| Function Name : INT i_AddiHeaderRW_ReadEeprom |*/ /*| (INT i_NbOfWordsToRead, |*/ /*| DWORD dw_PCIBoardEepromAddress, |*/ -/*| WORD w_EepromStartAddress, |*/ -/*| PWORD pw_DataRead) |*/ +/*| unsigned short w_EepromStartAddress, |*/ +/*| unsigned short * pw_DataRead) |*/ /*+----------------------------------------------------------------------------+*/ /*| Task : Read word from the 5920 eeprom. |*/ /*+----------------------------------------------------------------------------+*/ /*| Input Parameters : INT i_NbOfWordsToRead : Nbr. of word to read |*/ /*| DWORD dw_PCIBoardEepromAddress : Address of the eeprom |*/ -/*| WORD w_EepromStartAddress : Eeprom strat address |*/ +/*| unsigned short w_EepromStartAddress : Eeprom strat address |*/ /*+----------------------------------------------------------------------------+*/ -/*| Output Parameters : PWORD pw_DataRead : Read data |*/ +/*| Output Parameters : unsigned short * pw_DataRead : Read data |*/ /*+----------------------------------------------------------------------------+*/ /*| Return Value : - |*/ /*+----------------------------------------------------------------------------+*/ INT i_AddiHeaderRW_ReadEeprom(INT i_NbOfWordsToRead, DWORD dw_PCIBoardEepromAddress, - WORD w_EepromStartAddress, PWORD pw_DataRead) + unsigned short w_EepromStartAddress, unsigned short * pw_DataRead) { DWORD dw_eeprom_busy = 0; INT i_Counter = 0; @@ -79,7 +79,7 @@ INT i_AddiHeaderRW_ReadEeprom(INT i_NbOfWordsToRead, unsigned char b_ReadHighByte = 0; unsigned char b_SelectedAddressLow = 0; unsigned char b_SelectedAddressHigh = 0; - WORD w_ReadWord = 0; + unsigned short w_ReadWord = 0; for (i_WordCounter = 0; i_WordCounter < i_NbOfWordsToRead; i_WordCounter++) { diff --git a/drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.h b/drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.h index 9ae56bc..4a0f3c1 100644 --- a/drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.h +++ b/drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.h @@ -24,4 +24,4 @@ INT i_AddiHeaderRW_ReadEeprom(INT i_NbOfWordsToRead, DWORD dw_PCIBoardEepromAddress, - WORD w_EepromStartAddress, PWORD pw_DataRead); + unsigned short w_EepromStartAddress, unsigned short * pw_DataRead); diff --git a/drivers/staging/comedi/drivers/addi-data/addi_common.c b/drivers/staging/comedi/drivers/addi-data/addi_common.c index 618c69b..724e030 100644 --- a/drivers/staging/comedi/drivers/addi-data/addi_common.c +++ b/drivers/staging/comedi/drivers/addi-data/addi_common.c @@ -3049,8 +3049,8 @@ static irqreturn_t v_ADDI_Interrupt(int irq, void *d PT_REGS_ARG) static int i_ADDIDATA_InsnReadEeprom(struct comedi_device * dev, struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data) { - WORD w_Data; - WORD w_Address; + unsigned short w_Data; + unsigned short w_Address; w_Address = CR_CHAN(insn->chanspec); // address to be read as 0,1,2,3...255 w_Data = w_EepromReadWord(devpriv->i_IobaseAmcc, diff --git a/drivers/staging/comedi/drivers/addi-data/addi_common.h b/drivers/staging/comedi/drivers/addi-data/addi_common.h index 3dd7c98..1b8e2b1 100644 --- a/drivers/staging/comedi/drivers/addi-data/addi_common.h +++ b/drivers/staging/comedi/drivers/addi-data/addi_common.h @@ -37,7 +37,6 @@ #define SUCCESS 1 /* variable type definition */ -typedef unsigned short WORD, *PWORD; typedef int INT, *PINT;; typedef unsigned int UINT, *PUINT; typedef int LONG, *PLONG; /* 32-bit */ diff --git a/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c b/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c index 5cab638..c0372be 100644 --- a/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c +++ b/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c @@ -51,8 +51,6 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc #define EE76_CMD_LEN 13 // bits in instructions #define EE_READ 0x0180 // 01 1000 0000 read instruction -#define WORD unsigned short -#define PWORD unsigned short * #define PDWORD unsigned int * #ifndef DWORD @@ -69,49 +67,49 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc struct str_Functionality { unsigned char b_Type; - WORD w_Address; + unsigned short w_Address; }; typedef struct { - WORD w_HeaderSize; + unsigned short w_HeaderSize; unsigned char b_Nfunctions; struct str_Functionality s_Functions[7]; } str_MainHeader; typedef struct { - WORD w_Nchannel; + unsigned short w_Nchannel; unsigned char b_Interruptible; - WORD w_NinterruptLogic; + unsigned short w_NinterruptLogic; } str_DigitalInputHeader; typedef struct { - WORD w_Nchannel; + unsigned short w_Nchannel; } str_DigitalOutputHeader; // used for timer as well as watchdog typedef struct { - WORD w_HeaderSize; + unsigned short w_HeaderSize; unsigned char b_Resolution; unsigned char b_Mode; // in case of Watchdog it is functionality - WORD w_MinTiming; + unsigned short w_MinTiming; unsigned char b_TimeBase; } str_TimerDetails; typedef struct { - WORD w_Ntimer; + unsigned short w_Ntimer; str_TimerDetails s_TimerDetails[4]; // supports 4 timers } str_TimerMainHeader; typedef struct { - WORD w_Nchannel; + unsigned short w_Nchannel; unsigned char b_Resolution; } str_AnalogOutputHeader; typedef struct { - WORD w_Nchannel; - WORD w_MinConvertTiming; - WORD w_MinDelayTiming; + unsigned short w_Nchannel; + unsigned short w_MinConvertTiming; + unsigned short w_MinDelayTiming; unsigned char b_HasDma; unsigned char b_Resolution; } str_AnalogInputHeader; @@ -120,55 +118,55 @@ typedef struct { /* Read Header Functions */ /*****************************************/ -INT i_EepromReadMainHeader(WORD w_PCIBoardEepromAddress, +INT i_EepromReadMainHeader(unsigned short w_PCIBoardEepromAddress, char *pc_PCIChipInformation, struct comedi_device *dev); -INT i_EepromReadDigitalInputHeader(WORD w_PCIBoardEepromAddress, - char *pc_PCIChipInformation, WORD w_Address, +INT i_EepromReadDigitalInputHeader(unsigned short w_PCIBoardEepromAddress, + char *pc_PCIChipInformation, unsigned short w_Address, str_DigitalInputHeader * s_Header); -INT i_EepromReadDigitalOutputHeader(WORD w_PCIBoardEepromAddress, - char *pc_PCIChipInformation, WORD w_Address, +INT i_EepromReadDigitalOutputHeader(unsigned short w_PCIBoardEepromAddress, + char *pc_PCIChipInformation, unsigned short w_Address, str_DigitalOutputHeader * s_Header); -INT i_EepromReadTimerHeader(WORD w_PCIBoardEepromAddress, - char *pc_PCIChipInformation, WORD w_Address, +INT i_EepromReadTimerHeader(unsigned short w_PCIBoardEepromAddress, + char *pc_PCIChipInformation, unsigned short w_Address, str_TimerMainHeader * s_Header); -INT i_EepromReadAnlogOutputHeader(WORD w_PCIBoardEepromAddress, - char *pc_PCIChipInformation, WORD w_Address, +INT i_EepromReadAnlogOutputHeader(unsigned short w_PCIBoardEepromAddress, + char *pc_PCIChipInformation, unsigned short w_Address, str_AnalogOutputHeader * s_Header); -INT i_EepromReadAnlogInputHeader(WORD w_PCIBoardEepromAddress, - char *pc_PCIChipInformation, WORD w_Address, +INT i_EepromReadAnlogInputHeader(unsigned short w_PCIBoardEepromAddress, + char *pc_PCIChipInformation, unsigned short w_Address, str_AnalogInputHeader * s_Header); /******************************************/ /* Eeprom Specific Functions */ /******************************************/ -WORD w_EepromReadWord(WORD w_PCIBoardEepromAddress, char *pc_PCIChipInformation, - WORD w_EepromStartAddress); -void v_EepromWaitBusy(WORD w_PCIBoardEepromAddress); +unsigned short w_EepromReadWord(unsigned short w_PCIBoardEepromAddress, char *pc_PCIChipInformation, + unsigned short w_EepromStartAddress); +void v_EepromWaitBusy(unsigned short w_PCIBoardEepromAddress); void v_EepromClock76(DWORD dw_Address, DWORD dw_RegisterValue); -void v_EepromWaitBusy(WORD w_PCIBoardEepromAddress); +void v_EepromWaitBusy(unsigned short w_PCIBoardEepromAddress); void v_EepromSendCommand76(DWORD dw_Address, DWORD dw_EepromCommand, unsigned char b_DataLengthInBits); -void v_EepromCs76Read(DWORD dw_Address, WORD w_offset, PWORD pw_Value); +void v_EepromCs76Read(DWORD dw_Address, unsigned short w_offset, unsigned short * pw_Value); /* +----------------------------------------------------------------------------+ -| Function Name : WORD w_EepromReadWord | -| (WORD w_PCIBoardEepromAddress, | +| Function Name : unsigned short w_EepromReadWord | +| (unsigned short w_PCIBoardEepromAddress, | | char * pc_PCIChipInformation, | -| WORD w_EepromStartAddress) | +| unsigned short w_EepromStartAddress) | +----------------------------------------------------------------------------+ | Task : Read from eepromn a word | +----------------------------------------------------------------------------+ -| Input Parameters : WORD w_PCIBoardEepromAddress : PCI eeprom address | +| Input Parameters : unsigned short w_PCIBoardEepromAddress : PCI eeprom address | | | | char *pc_PCIChipInformation : PCI Chip Type. | | | -| WORD w_EepromStartAddress : Selected eeprom address | +| unsigned short w_EepromStartAddress : Selected eeprom address | +----------------------------------------------------------------------------+ | Output Parameters : - | +----------------------------------------------------------------------------+ @@ -176,8 +174,8 @@ void v_EepromCs76Read(DWORD dw_Address, WORD w_offset, PWORD pw_Value); +----------------------------------------------------------------------------+ */ -WORD w_EepromReadWord(WORD w_PCIBoardEepromAddress, char *pc_PCIChipInformation, - WORD w_EepromStartAddress) +unsigned short w_EepromReadWord(unsigned short w_PCIBoardEepromAddress, char *pc_PCIChipInformation, + unsigned short w_EepromStartAddress) { unsigned char b_Counter = 0; @@ -192,7 +190,7 @@ WORD w_EepromReadWord(WORD w_PCIBoardEepromAddress, char *pc_PCIChipInformation, unsigned char b_SelectedAddressHigh = 0; - WORD w_ReadWord = 0; + unsigned short w_ReadWord = 0; /**************************/ @@ -331,7 +329,7 @@ WORD w_EepromReadWord(WORD w_PCIBoardEepromAddress, char *pc_PCIChipInformation, } // for (b_Counter=0; b_Counter<2; b_Counter++) - w_ReadWord = (b_ReadLowByte | (((WORD) b_ReadHighByte) * 256)); + w_ReadWord = (b_ReadLowByte | (((unsigned short) b_ReadHighByte) * 256)); } // end of if ((!strcmp(pc_PCIChipInformation, "S5920")) || (!strcmp(pc_PCIChipInformation, "S5933"))) @@ -359,7 +357,7 @@ WORD w_EepromReadWord(WORD w_PCIBoardEepromAddress, char *pc_PCIChipInformation, | Function Name : void v_EepromWaitBusy | -| (WORD w_PCIBoardEepromAddress) | +| (unsigned short w_PCIBoardEepromAddress) | +----------------------------------------------------------------------------+ @@ -367,7 +365,7 @@ WORD w_EepromReadWord(WORD w_PCIBoardEepromAddress, char *pc_PCIChipInformation, +----------------------------------------------------------------------------+ -| Input Parameters : WORD w_PCIBoardEepromAddress : PCI eeprom base address | +| Input Parameters : unsigned short w_PCIBoardEepromAddress : PCI eeprom base address | +----------------------------------------------------------------------------+ @@ -381,7 +379,7 @@ WORD w_EepromReadWord(WORD w_PCIBoardEepromAddress, char *pc_PCIChipInformation, */ -void v_EepromWaitBusy(WORD w_PCIBoardEepromAddress) +void v_EepromWaitBusy(unsigned short w_PCIBoardEepromAddress) { unsigned char b_EepromBusy = 0; @@ -403,7 +401,7 @@ void v_EepromWaitBusy(WORD w_PCIBoardEepromAddress) /* the operator register is AMCC_OP_REG_MCSR+3 */ - /* WORD read EEPROM=0x8000 andAMCC_OP_REG_MCSR+2 */ + /* unsigned short read EEPROM=0x8000 andAMCC_OP_REG_MCSR+2 */ /* DWORD read EEPROM=0x80000000 and AMCC_OP_REG_MCSR */ @@ -625,9 +623,9 @@ void v_EepromSendCommand76(DWORD dw_Address, DWORD dw_EepromCommand, | Function Name : void v_EepromCs76Read(DWORD dw_Address, | -| WORD w_offset, | +| unsigned short w_offset, | -| PWORD pw_Value) | +| unsigned short * pw_Value) | +---------------------------------------------------------------------------------+ @@ -637,9 +635,9 @@ void v_EepromSendCommand76(DWORD dw_Address, DWORD dw_EepromCommand, | Input Parameters : DWORD dw_Address : PCI eeprom base address | -| WORD w_offset : Offset of the adress to read | +| unsigned short w_offset : Offset of the adress to read | -| PWORD pw_Value : PCI eeprom 16 bit read value. | +| unsigned short * pw_Value : PCI eeprom 16 bit read value. | +---------------------------------------------------------------------------------+ @@ -653,7 +651,7 @@ void v_EepromSendCommand76(DWORD dw_Address, DWORD dw_EepromCommand, */ -void v_EepromCs76Read(DWORD dw_Address, WORD w_offset, PWORD pw_Value) +void v_EepromCs76Read(DWORD dw_Address, unsigned short w_offset, unsigned short * pw_Value) { char c_BitPos = 0; @@ -786,12 +784,12 @@ void v_EepromCs76Read(DWORD dw_Address, WORD w_offset, PWORD pw_Value) /* +----------------------------------------------------------------------------+ -| Function Name : INT i_EepromReadMainHeader(WORD w_PCIBoardEepromAddress, | +| Function Name : INT i_EepromReadMainHeader(unsigned short w_PCIBoardEepromAddress, | | char * pc_PCIChipInformation,struct comedi_device *dev) | +----------------------------------------------------------------------------+ | Task : Read from eeprom Main Header | +----------------------------------------------------------------------------+ -| Input Parameters : WORD w_PCIBoardEepromAddress : PCI eeprom address | +| Input Parameters : unsigned short w_PCIBoardEepromAddress : PCI eeprom address | | | | char *pc_PCIChipInformation : PCI Chip Type. | | | @@ -804,10 +802,10 @@ void v_EepromCs76Read(DWORD dw_Address, WORD w_offset, PWORD pw_Value) +----------------------------------------------------------------------------+ */ -INT i_EepromReadMainHeader(WORD w_PCIBoardEepromAddress, +INT i_EepromReadMainHeader(unsigned short w_PCIBoardEepromAddress, char *pc_PCIChipInformation, struct comedi_device *dev) { - WORD w_Temp, i, w_Count = 0; + unsigned short w_Temp, i, w_Count = 0; UINT ui_Temp; str_MainHeader s_MainHeader; str_DigitalInputHeader s_DigitalInputHeader; @@ -920,14 +918,14 @@ INT i_EepromReadMainHeader(WORD w_PCIBoardEepromAddress, /* +----------------------------------------------------------------------------+ -| Function Name : INT i_EepromReadDigitalInputHeader(WORD | +| Function Name : INT i_EepromReadDigitalInputHeader(unsigned short | | w_PCIBoardEepromAddress,char *pc_PCIChipInformation, | -| WORD w_Address,str_DigitalInputHeader *s_Header) | +| unsigned short w_Address,str_DigitalInputHeader *s_Header) | | | +----------------------------------------------------------------------------+ | Task : Read Digital Input Header | +----------------------------------------------------------------------------+ -| Input Parameters : WORD w_PCIBoardEepromAddress : PCI eeprom address | +| Input Parameters : unsigned short w_PCIBoardEepromAddress : PCI eeprom address | | | | char *pc_PCIChipInformation : PCI Chip Type. | | | @@ -939,11 +937,11 @@ INT i_EepromReadMainHeader(WORD w_PCIBoardEepromAddress, | Return Value : 0 | +----------------------------------------------------------------------------+ */ -INT i_EepromReadDigitalInputHeader(WORD w_PCIBoardEepromAddress, - char *pc_PCIChipInformation, WORD w_Address, +INT i_EepromReadDigitalInputHeader(unsigned short w_PCIBoardEepromAddress, + char *pc_PCIChipInformation, unsigned short w_Address, str_DigitalInputHeader * s_Header) { - WORD w_Temp; + unsigned short w_Temp; // read nbr of channels s_Header->w_Nchannel = @@ -965,14 +963,14 @@ INT i_EepromReadDigitalInputHeader(WORD w_PCIBoardEepromAddress, /* +----------------------------------------------------------------------------+ -| Function Name : INT i_EepromReadDigitalOutputHeader(WORD | +| Function Name : INT i_EepromReadDigitalOutputHeader(unsigned short | | w_PCIBoardEepromAddress,char *pc_PCIChipInformation, | -| WORD w_Address,str_DigitalOutputHeader *s_Header) | +| unsigned short w_Address,str_DigitalOutputHeader *s_Header) | | | +----------------------------------------------------------------------------+ | Task : Read Digital Output Header | +----------------------------------------------------------------------------+ -| Input Parameters : WORD w_PCIBoardEepromAddress : PCI eeprom address | +| Input Parameters : unsigned short w_PCIBoardEepromAddress : PCI eeprom address | | | | char *pc_PCIChipInformation : PCI Chip Type. | | | @@ -984,8 +982,8 @@ INT i_EepromReadDigitalInputHeader(WORD w_PCIBoardEepromAddress, | Return Value : 0 | +----------------------------------------------------------------------------+ */ -INT i_EepromReadDigitalOutputHeader(WORD w_PCIBoardEepromAddress, - char *pc_PCIChipInformation, WORD w_Address, +INT i_EepromReadDigitalOutputHeader(unsigned short w_PCIBoardEepromAddress, + char *pc_PCIChipInformation, unsigned short w_Address, str_DigitalOutputHeader * s_Header) { // Read Nbr channels @@ -997,13 +995,13 @@ INT i_EepromReadDigitalOutputHeader(WORD w_PCIBoardEepromAddress, /* +----------------------------------------------------------------------------+ -| Function Name : INT i_EepromReadTimerHeader(WORD w_PCIBoardEepromAddress, | +| Function Name : INT i_EepromReadTimerHeader(unsigned short w_PCIBoardEepromAddress, | | char *pc_PCIChipInformation,WORD w_Address, | | str_TimerMainHeader *s_Header) | +----------------------------------------------------------------------------+ | Task : Read Timer or Watchdog Header | +----------------------------------------------------------------------------+ -| Input Parameters : WORD w_PCIBoardEepromAddress : PCI eeprom address | +| Input Parameters : unsigned short w_PCIBoardEepromAddress : PCI eeprom address | | | | char *pc_PCIChipInformation : PCI Chip Type. | | | @@ -1015,12 +1013,12 @@ INT i_EepromReadDigitalOutputHeader(WORD w_PCIBoardEepromAddress, | Return Value : 0 | +----------------------------------------------------------------------------+ */ -INT i_EepromReadTimerHeader(WORD w_PCIBoardEepromAddress, - char *pc_PCIChipInformation, WORD w_Address, +INT i_EepromReadTimerHeader(unsigned short w_PCIBoardEepromAddress, + char *pc_PCIChipInformation, unsigned short w_Address, str_TimerMainHeader * s_Header) { - WORD i, w_Size = 0, w_Temp; + unsigned short i, w_Size = 0, w_Temp; //Read No of Timer s_Header->w_Ntimer = @@ -1062,13 +1060,13 @@ INT i_EepromReadTimerHeader(WORD w_PCIBoardEepromAddress, /* +----------------------------------------------------------------------------+ -| Function Name : INT i_EepromReadAnlogOutputHeader(WORD | +| Function Name : INT i_EepromReadAnlogOutputHeader(unsigned short | | w_PCIBoardEepromAddress,char *pc_PCIChipInformation, | -| WORD w_Address,str_AnalogOutputHeader *s_Header) | +| unsigned short w_Address,str_AnalogOutputHeader *s_Header) | +----------------------------------------------------------------------------+ | Task : Read Nalog Output Header | +----------------------------------------------------------------------------+ -| Input Parameters : WORD w_PCIBoardEepromAddress : PCI eeprom address | +| Input Parameters : unsigned short w_PCIBoardEepromAddress : PCI eeprom address | | | | char *pc_PCIChipInformation : PCI Chip Type. | | | @@ -1081,11 +1079,11 @@ INT i_EepromReadTimerHeader(WORD w_PCIBoardEepromAddress, +----------------------------------------------------------------------------+ */ -INT i_EepromReadAnlogOutputHeader(WORD w_PCIBoardEepromAddress, - char *pc_PCIChipInformation, WORD w_Address, +INT i_EepromReadAnlogOutputHeader(unsigned short w_PCIBoardEepromAddress, + char *pc_PCIChipInformation, unsigned short w_Address, str_AnalogOutputHeader * s_Header) { - WORD w_Temp; + unsigned short w_Temp; // No of channels for 1st hard component w_Temp = w_EepromReadWord(w_PCIBoardEepromAddress, pc_PCIChipInformation, 0x100 + w_Address + 10); @@ -1099,13 +1097,13 @@ INT i_EepromReadAnlogOutputHeader(WORD w_PCIBoardEepromAddress, /* +----------------------------------------------------------------------------+ -| Function Name : INT i_EepromReadAnlogInputHeader(WORD | +| Function Name : INT i_EepromReadAnlogInputHeader(unsigned short | | w_PCIBoardEepromAddress,char *pc_PCIChipInformation, | -| WORD w_Address,str_AnalogInputHeader *s_Header) | +| unsigned short w_Address,str_AnalogInputHeader *s_Header) | +----------------------------------------------------------------------------+ | Task : Read Nalog Output Header | +----------------------------------------------------------------------------+ -| Input Parameters : WORD w_PCIBoardEepromAddress : PCI eeprom address | +| Input Parameters : unsigned short w_PCIBoardEepromAddress : PCI eeprom address | | | | char *pc_PCIChipInformation : PCI Chip Type. | | | @@ -1119,11 +1117,11 @@ INT i_EepromReadAnlogOutputHeader(WORD w_PCIBoardEepromAddress, */ // Reads only for ONE hardware component -INT i_EepromReadAnlogInputHeader(WORD w_PCIBoardEepromAddress, - char *pc_PCIChipInformation, WORD w_Address, +INT i_EepromReadAnlogInputHeader(unsigned short w_PCIBoardEepromAddress, + char *pc_PCIChipInformation, unsigned short w_Address, str_AnalogInputHeader * s_Header) { - WORD w_Temp, w_Offset; + unsigned short w_Temp, w_Offset; w_Temp = w_EepromReadWord(w_PCIBoardEepromAddress, pc_PCIChipInformation, 0x100 + w_Address + 10); s_Header->w_Nchannel = (w_Temp >> 4) & 0x03FF; diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c index 47b859e..b06ff1e 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c @@ -952,7 +952,7 @@ int i_APCI3120_CyclicAnalogInput(int mode, struct comedi_device * dev, outb(devpriv->b_TimerSelectMode, dev->iobase + APCI3120_TIMER_CRT1); - //Writing LOW WORD + //Writing LOW unsigned short b_Tmp = ((devpriv-> b_DigitalOutputRegister) & 0xF0) | APCI3120_SELECT_TIMER_2_LOW_WORD; @@ -960,7 +960,7 @@ int i_APCI3120_CyclicAnalogInput(int mode, struct comedi_device * dev, outw(LOWORD(ui_TimerValue2), dev->iobase + APCI3120_TIMER_VALUE); - //Writing HIGH WORD + //Writing HIGH unsigned short b_Tmp = ((devpriv-> b_DigitalOutputRegister) & 0xF0) | APCI3120_SELECT_TIMER_2_HIGH_WORD; @@ -2027,12 +2027,12 @@ int i_APCI3120_InsnConfigTimer(struct comedi_device * dev, struct comedi_subdevi outb(devpriv->b_TimerSelectMode, devpriv->iobase + APCI3120_TIMER_CRT1); - //Configure the timer 2 for writing the LOW WORD of timer is Delay value + //Configure the timer 2 for writing the LOW unsigned short of timer is Delay value //You must make a b_tmp variable with DigitalOutPutRegister because at Address_1+APCI3120_TIMER_CRT0 //you can set the digital output and configure the timer 2,and if you don't make this, digital output //are erase (Set to 0) - //Writing LOW WORD + //Writing LOW unsigned short b_Tmp = ((devpriv-> b_DigitalOutputRegister) & 0xF0) | APCI3120_SELECT_TIMER_2_LOW_WORD; @@ -2040,7 +2040,7 @@ int i_APCI3120_InsnConfigTimer(struct comedi_device * dev, struct comedi_subdevi outw(LOWORD(ui_Timervalue2), devpriv->iobase + APCI3120_TIMER_VALUE); - //Writing HIGH WORD + //Writing HIGH unsigned short b_Tmp = ((devpriv-> b_DigitalOutputRegister) & 0xF0) | APCI3120_SELECT_TIMER_2_HIGH_WORD; @@ -2061,12 +2061,12 @@ int i_APCI3120_InsnConfigTimer(struct comedi_device * dev, struct comedi_subdevi outb(devpriv->b_TimerSelectMode, devpriv->iobase + APCI3120_TIMER_CRT1); - //Configure the timer 2 for writing the LOW WORD of timer is Delay value + //Configure the timer 2 for writing the LOW unsigned short of timer is Delay value //You must make a b_tmp variable with DigitalOutPutRegister because at Address_1+APCI3120_TIMER_CRT0 //you can set the digital output and configure the timer 2,and if you don't make this, digital output //are erase (Set to 0) - //Writing LOW WORD + //Writing LOW unsigned short b_Tmp = ((devpriv-> b_DigitalOutputRegister) & 0xF0) | APCI3120_SELECT_TIMER_2_LOW_WORD; @@ -2074,7 +2074,7 @@ int i_APCI3120_InsnConfigTimer(struct comedi_device * dev, struct comedi_subdevi outw(LOWORD(ui_Timervalue2), devpriv->iobase + APCI3120_TIMER_VALUE); - //Writing HIGH WORD + //Writing HIGH unsigned short b_Tmp = ((devpriv-> b_DigitalOutputRegister) & 0xF0) | APCI3120_SELECT_TIMER_2_HIGH_WORD; @@ -2256,7 +2256,7 @@ int i_APCI3120_InsnWriteTimer(struct comedi_device * dev, struct comedi_subdevic //Calculate the time value to set in the timer ui_Timervalue2 = ui_Timervalue2 / 70; } - //Writing LOW WORD + //Writing LOW unsigned short b_Tmp = ((devpriv-> b_DigitalOutputRegister) & 0xF0) | APCI3120_SELECT_TIMER_2_LOW_WORD; @@ -2265,7 +2265,7 @@ int i_APCI3120_InsnWriteTimer(struct comedi_device * dev, struct comedi_subdevic outw(LOWORD(ui_Timervalue2), devpriv->iobase + APCI3120_TIMER_VALUE); - //Writing HIGH WORD + //Writing HIGH unsigned short b_Tmp = ((devpriv-> b_DigitalOutputRegister) & 0xF0) | APCI3120_SELECT_TIMER_2_HIGH_WORD; @@ -2319,7 +2319,7 @@ int i_APCI3120_InsnReadTimer(struct comedi_device * dev, struct comedi_subdevice //this_board->i_hwdrv_InsnReadTimer(dev,data); if (devpriv->b_Timer2Mode == APCI3120_TIMER) { - //Read the LOW WORD of Timer 2 register + //Read the LOW unsigned short of Timer 2 register b_Tmp = ((devpriv-> b_DigitalOutputRegister) & 0xF0) | APCI3120_SELECT_TIMER_2_LOW_WORD; @@ -2327,7 +2327,7 @@ int i_APCI3120_InsnReadTimer(struct comedi_device * dev, struct comedi_subdevice us_TmpValue = inw(devpriv->iobase + APCI3120_TIMER_VALUE); - //Read the HIGH WORD of Timer 2 register + //Read the HIGH unsigned short of Timer 2 register b_Tmp = ((devpriv-> b_DigitalOutputRegister) & 0xF0) | APCI3120_SELECT_TIMER_2_HIGH_WORD; diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c index d44837c..1251362 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c @@ -96,23 +96,23 @@ str_BoardInfos s_BoardInfos[100]; // 100 will be the max number of boards to be /*| Function Name : INT i_AddiHeaderRW_ReadEeprom |*/ /*| (INT i_NbOfWordsToRead, |*/ /*| DWORD dw_PCIBoardEepromAddress, |*/ -/*| WORD w_EepromStartAddress, |*/ -/*| PWORD pw_DataRead) |*/ +/*| unsigned short w_EepromStartAddress, |*/ +/*| unsigned short * pw_DataRead) |*/ /*+----------------------------------------------------------------------------+*/ /*| Task : Read word from the 5920 eeprom. |*/ /*+----------------------------------------------------------------------------+*/ /*| Input Parameters : INT i_NbOfWordsToRead : Nbr. of word to read |*/ /*| DWORD dw_PCIBoardEepromAddress : Address of the eeprom |*/ -/*| WORD w_EepromStartAddress : Eeprom strat address |*/ +/*| unsigned short w_EepromStartAddress : Eeprom strat address |*/ /*+----------------------------------------------------------------------------+*/ -/*| Output Parameters : PWORD pw_DataRead : Read data |*/ +/*| Output Parameters : unsigned short * pw_DataRead : Read data |*/ /*+----------------------------------------------------------------------------+*/ /*| Return Value : - |*/ /*+----------------------------------------------------------------------------+*/ INT i_AddiHeaderRW_ReadEeprom(INT i_NbOfWordsToRead, DWORD dw_PCIBoardEepromAddress, - WORD w_EepromStartAddress, PWORD pw_DataRead) + unsigned short w_EepromStartAddress, unsigned short * pw_DataRead) { DWORD dw_eeprom_busy = 0; INT i_Counter = 0; @@ -123,7 +123,7 @@ INT i_AddiHeaderRW_ReadEeprom(INT i_NbOfWordsToRead, unsigned char b_ReadHighByte = 0; unsigned char b_SelectedAddressLow = 0; unsigned char b_SelectedAddressHigh = 0; - WORD w_ReadWord = 0; + unsigned short w_ReadWord = 0; for (i_WordCounter = 0; i_WordCounter < i_NbOfWordsToRead; i_WordCounter++) { @@ -261,22 +261,22 @@ INT i_AddiHeaderRW_ReadEeprom(INT i_NbOfWordsToRead, void v_GetAPCI3200EepromCalibrationValue(DWORD dw_PCIBoardEepromAddress, str_BoardInfos * BoardInformations) { - WORD w_AnalogInputMainHeaderAddress; - WORD w_AnalogInputComponentAddress; - WORD w_NumberOfModuls = 0; - WORD w_CurrentSources[2]; - WORD w_ModulCounter = 0; - WORD w_FirstHeaderSize = 0; - WORD w_NumberOfInputs = 0; - WORD w_CJCFlag = 0; - WORD w_NumberOfGainValue = 0; - WORD w_SingleHeaderAddress = 0; - WORD w_SingleHeaderSize = 0; - WORD w_Input = 0; - WORD w_GainFactorAddress = 0; - WORD w_GainFactorValue[2]; - WORD w_GainIndex = 0; - WORD w_GainValue = 0; + unsigned short w_AnalogInputMainHeaderAddress; + unsigned short w_AnalogInputComponentAddress; + unsigned short w_NumberOfModuls = 0; + unsigned short w_CurrentSources[2]; + unsigned short w_ModulCounter = 0; + unsigned short w_FirstHeaderSize = 0; + unsigned short w_NumberOfInputs = 0; + unsigned short w_CJCFlag = 0; + unsigned short w_NumberOfGainValue = 0; + unsigned short w_SingleHeaderAddress = 0; + unsigned short w_SingleHeaderSize = 0; + unsigned short w_Input = 0; + unsigned short w_GainFactorAddress = 0; + unsigned short w_GainFactorValue[2]; + unsigned short w_GainIndex = 0; + unsigned short w_GainValue = 0; /*****************************************/ /** Get the Analog input header address **/ -- cgit v0.10.2