aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/comedi/drivers/addi-data/APCI1710_Ssi.c8
-rw-r--r--drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.c21
-rw-r--r--drivers/staging/comedi/drivers/addi-data/addi_eeprom.c3
-rw-r--r--drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c5
-rw-r--r--drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c27
-rw-r--r--drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c6
6 files changed, 25 insertions, 45 deletions
diff --git a/drivers/staging/comedi/drivers/addi-data/APCI1710_Ssi.c b/drivers/staging/comedi/drivers/addi-data/APCI1710_Ssi.c
index a94b9809382..a445dab50ea 100644
--- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Ssi.c
+++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Ssi.c
@@ -477,9 +477,8 @@ int i_APCI1710_InsnReadSSIValue(struct comedi_device *dev, struct comedi_subdevi
477 s_BoardInfos. 477 s_BoardInfos.
478 ui_Address + 478 ui_Address +
479 (64 * b_ModulNbr)); 479 (64 * b_ModulNbr));
480 } 480 } while ((dw_StatusReg & 0x1)
481 while ((dw_StatusReg & 0x1) != 481 != 0);
482 0);
483 482
484 /******************************/ 483 /******************************/
485 /* Read the SSI counter value */ 484 /* Read the SSI counter value */
@@ -608,8 +607,7 @@ int i_APCI1710_InsnReadSSIValue(struct comedi_device *dev, struct comedi_subdevi
608 s_BoardInfos. 607 s_BoardInfos.
609 ui_Address + 608 ui_Address +
610 (64 * b_ModulNbr)); 609 (64 * b_ModulNbr));
611 } 610 } while ((dw_StatusReg & 0x1) != 0);
612 while ((dw_StatusReg & 0x1) != 0);
613 611
614 for (b_SSICpt = 0; b_SSICpt < 3; 612 for (b_SSICpt = 0; b_SSICpt < 3;
615 b_SSICpt++) { 613 b_SSICpt++) {
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 6ada45a46d6..556ed46d78a 100644
--- a/drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.c
+++ b/drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.c
@@ -88,8 +88,7 @@ int i_AddiHeaderRW_ReadEeprom(int i_NbOfWordsToRead,
88 inl(dw_PCIBoardEepromAddress + 88 inl(dw_PCIBoardEepromAddress +
89 AMCC_OP_REG_MCSR); 89 AMCC_OP_REG_MCSR);
90 dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY; 90 dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY;
91 } 91 } while (dw_eeprom_busy == EEPROM_BUSY);
92 while (dw_eeprom_busy == EEPROM_BUSY);
93 92
94 for (i_Counter = 0; i_Counter < 2; i_Counter++) { 93 for (i_Counter = 0; i_Counter < 2; i_Counter++) {
95 b_SelectedAddressLow = (w_EepromStartAddress + i_Counter) % 256; /* Read the low 8 bit part */ 94 b_SelectedAddressLow = (w_EepromStartAddress + i_Counter) % 256; /* Read the low 8 bit part */
@@ -106,8 +105,7 @@ int i_AddiHeaderRW_ReadEeprom(int i_NbOfWordsToRead,
106 inl(dw_PCIBoardEepromAddress + 105 inl(dw_PCIBoardEepromAddress +
107 AMCC_OP_REG_MCSR); 106 AMCC_OP_REG_MCSR);
108 dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY; 107 dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY;
109 } 108 } while (dw_eeprom_busy == EEPROM_BUSY);
110 while (dw_eeprom_busy == EEPROM_BUSY);
111 109
112 /* Load the low address */ 110 /* Load the low address */
113 outb(b_SelectedAddressLow, 111 outb(b_SelectedAddressLow,
@@ -120,8 +118,7 @@ int i_AddiHeaderRW_ReadEeprom(int i_NbOfWordsToRead,
120 inl(dw_PCIBoardEepromAddress + 118 inl(dw_PCIBoardEepromAddress +
121 AMCC_OP_REG_MCSR); 119 AMCC_OP_REG_MCSR);
122 dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY; 120 dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY;
123 } 121 } while (dw_eeprom_busy == EEPROM_BUSY);
124 while (dw_eeprom_busy == EEPROM_BUSY);
125 122
126 /* Select the load high address mode */ 123 /* Select the load high address mode */
127 outb(NVCMD_LOAD_HIGH, 124 outb(NVCMD_LOAD_HIGH,
@@ -134,8 +131,7 @@ int i_AddiHeaderRW_ReadEeprom(int i_NbOfWordsToRead,
134 inl(dw_PCIBoardEepromAddress + 131 inl(dw_PCIBoardEepromAddress +
135 AMCC_OP_REG_MCSR); 132 AMCC_OP_REG_MCSR);
136 dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY; 133 dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY;
137 } 134 } while (dw_eeprom_busy == EEPROM_BUSY);
138 while (dw_eeprom_busy == EEPROM_BUSY);
139 135
140 /* Load the high address */ 136 /* Load the high address */
141 outb(b_SelectedAddressHigh, 137 outb(b_SelectedAddressHigh,
@@ -148,8 +144,7 @@ int i_AddiHeaderRW_ReadEeprom(int i_NbOfWordsToRead,
148 inl(dw_PCIBoardEepromAddress + 144 inl(dw_PCIBoardEepromAddress +
149 AMCC_OP_REG_MCSR); 145 AMCC_OP_REG_MCSR);
150 dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY; 146 dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY;
151 } 147 } while (dw_eeprom_busy == EEPROM_BUSY);
152 while (dw_eeprom_busy == EEPROM_BUSY);
153 148
154 /* Select the READ mode */ 149 /* Select the READ mode */
155 outb(NVCMD_BEGIN_READ, 150 outb(NVCMD_BEGIN_READ,
@@ -162,8 +157,7 @@ int i_AddiHeaderRW_ReadEeprom(int i_NbOfWordsToRead,
162 inl(dw_PCIBoardEepromAddress + 157 inl(dw_PCIBoardEepromAddress +
163 AMCC_OP_REG_MCSR); 158 AMCC_OP_REG_MCSR);
164 dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY; 159 dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY;
165 } 160 } while (dw_eeprom_busy == EEPROM_BUSY);
166 while (dw_eeprom_busy == EEPROM_BUSY);
167 161
168 /* Read data into the EEPROM */ 162 /* Read data into the EEPROM */
169 *pb_ReadByte = 163 *pb_ReadByte =
@@ -176,8 +170,7 @@ int i_AddiHeaderRW_ReadEeprom(int i_NbOfWordsToRead,
176 inl(dw_PCIBoardEepromAddress + 170 inl(dw_PCIBoardEepromAddress +
177 AMCC_OP_REG_MCSR); 171 AMCC_OP_REG_MCSR);
178 dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY; 172 dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY;
179 } 173 } while (dw_eeprom_busy == EEPROM_BUSY);
180 while (dw_eeprom_busy == EEPROM_BUSY);
181 174
182 /* Select the upper address part */ 175 /* Select the upper address part */
183 if (i_Counter == 0) { 176 if (i_Counter == 0) {
diff --git a/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c b/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c
index 208ade70ad0..69b427390e5 100644
--- a/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c
+++ b/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c
@@ -411,8 +411,7 @@ void v_EepromWaitBusy(unsigned short w_PCIBoardEepromAddress)
411 b_EepromBusy = inb(w_PCIBoardEepromAddress + 0x3F); 411 b_EepromBusy = inb(w_PCIBoardEepromAddress + 0x3F);
412 b_EepromBusy = b_EepromBusy & 0x80; 412 b_EepromBusy = b_EepromBusy & 0x80;
413 413
414 } 414 } while (b_EepromBusy == 0x80);
415 while (b_EepromBusy == 0x80);
416 415
417} 416}
418 417
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c
index 26aaeaf2568..69d5c3a92f0 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c
@@ -368,9 +368,8 @@ int i_APCI3120_InsnReadAnalogInput(struct comedi_device *dev, struct comedi_subd
368 us_TmpValue = 368 us_TmpValue =
369 inw(devpriv->iobase + 369 inw(devpriv->iobase +
370 APCI3120_RD_STATUS); 370 APCI3120_RD_STATUS);
371 } 371 } while ((us_TmpValue & APCI3120_EOS) !=
372 while ((us_TmpValue & APCI3120_EOS) != 372 APCI3120_EOS);
373 APCI3120_EOS);
374 373
375 for (i = 0; i < devpriv->ui_AiNbrofChannels; 374 for (i = 0; i < devpriv->ui_AiNbrofChannels;
376 i++) { 375 i++) {
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c
index 7dda0665340..89d4e21b995 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c
@@ -132,8 +132,7 @@ int i_AddiHeaderRW_ReadEeprom(int i_NbOfWordsToRead,
132 inl(dw_PCIBoardEepromAddress + 132 inl(dw_PCIBoardEepromAddress +
133 AMCC_OP_REG_MCSR); 133 AMCC_OP_REG_MCSR);
134 dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY; 134 dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY;
135 } 135 } while (dw_eeprom_busy == EEPROM_BUSY);
136 while (dw_eeprom_busy == EEPROM_BUSY);
137 136
138 for (i_Counter = 0; i_Counter < 2; i_Counter++) { 137 for (i_Counter = 0; i_Counter < 2; i_Counter++) {
139 b_SelectedAddressLow = (w_EepromStartAddress + i_Counter) % 256; /* Read the low 8 bit part */ 138 b_SelectedAddressLow = (w_EepromStartAddress + i_Counter) % 256; /* Read the low 8 bit part */
@@ -150,8 +149,7 @@ int i_AddiHeaderRW_ReadEeprom(int i_NbOfWordsToRead,
150 inl(dw_PCIBoardEepromAddress + 149 inl(dw_PCIBoardEepromAddress +
151 AMCC_OP_REG_MCSR); 150 AMCC_OP_REG_MCSR);
152 dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY; 151 dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY;
153 } 152 } while (dw_eeprom_busy == EEPROM_BUSY);
154 while (dw_eeprom_busy == EEPROM_BUSY);
155 153
156 /* Load the low address */ 154 /* Load the low address */
157 outb(b_SelectedAddressLow, 155 outb(b_SelectedAddressLow,
@@ -164,8 +162,7 @@ int i_AddiHeaderRW_ReadEeprom(int i_NbOfWordsToRead,
164 inl(dw_PCIBoardEepromAddress + 162 inl(dw_PCIBoardEepromAddress +
165 AMCC_OP_REG_MCSR); 163 AMCC_OP_REG_MCSR);
166 dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY; 164 dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY;
167 } 165 } while (dw_eeprom_busy == EEPROM_BUSY);
168 while (dw_eeprom_busy == EEPROM_BUSY);
169 166
170 /* Select the load high address mode */ 167 /* Select the load high address mode */
171 outb(NVCMD_LOAD_HIGH, 168 outb(NVCMD_LOAD_HIGH,
@@ -178,8 +175,7 @@ int i_AddiHeaderRW_ReadEeprom(int i_NbOfWordsToRead,
178 inl(dw_PCIBoardEepromAddress + 175 inl(dw_PCIBoardEepromAddress +
179 AMCC_OP_REG_MCSR); 176 AMCC_OP_REG_MCSR);
180 dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY; 177 dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY;
181 } 178 } while (dw_eeprom_busy == EEPROM_BUSY);
182 while (dw_eeprom_busy == EEPROM_BUSY);
183 179
184 /* Load the high address */ 180 /* Load the high address */
185 outb(b_SelectedAddressHigh, 181 outb(b_SelectedAddressHigh,
@@ -192,8 +188,7 @@ int i_AddiHeaderRW_ReadEeprom(int i_NbOfWordsToRead,
192 inl(dw_PCIBoardEepromAddress + 188 inl(dw_PCIBoardEepromAddress +
193 AMCC_OP_REG_MCSR); 189 AMCC_OP_REG_MCSR);
194 dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY; 190 dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY;
195 } 191 } while (dw_eeprom_busy == EEPROM_BUSY);
196 while (dw_eeprom_busy == EEPROM_BUSY);
197 192
198 /* Select the READ mode */ 193 /* Select the READ mode */
199 outb(NVCMD_BEGIN_READ, 194 outb(NVCMD_BEGIN_READ,
@@ -206,8 +201,7 @@ int i_AddiHeaderRW_ReadEeprom(int i_NbOfWordsToRead,
206 inl(dw_PCIBoardEepromAddress + 201 inl(dw_PCIBoardEepromAddress +
207 AMCC_OP_REG_MCSR); 202 AMCC_OP_REG_MCSR);
208 dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY; 203 dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY;
209 } 204 } while (dw_eeprom_busy == EEPROM_BUSY);
210 while (dw_eeprom_busy == EEPROM_BUSY);
211 205
212 /* Read data into the EEPROM */ 206 /* Read data into the EEPROM */
213 *pb_ReadByte = 207 *pb_ReadByte =
@@ -220,15 +214,14 @@ int i_AddiHeaderRW_ReadEeprom(int i_NbOfWordsToRead,
220 inl(dw_PCIBoardEepromAddress + 214 inl(dw_PCIBoardEepromAddress +
221 AMCC_OP_REG_MCSR); 215 AMCC_OP_REG_MCSR);
222 dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY; 216 dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY;
223 } 217 } while (dw_eeprom_busy == EEPROM_BUSY);
224 while (dw_eeprom_busy == EEPROM_BUSY);
225 218
226 /* Select the upper address part */ 219 /* Select the upper address part */
227 if (i_Counter == 0) { 220 if (i_Counter == 0)
228 b_ReadLowByte = pb_ReadByte[0]; 221 b_ReadLowByte = pb_ReadByte[0];
229 } else { 222 else
230 b_ReadHighByte = pb_ReadByte[0]; 223 b_ReadHighByte = pb_ReadByte[0];
231 } 224
232 225
233 /* Sleep */ 226 /* Sleep */
234 for (i = 0; i < 10000; i++) ; 227 for (i = 0; i < 10000; i++) ;
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c
index 30594c8acd3..33872787982 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c
@@ -535,8 +535,7 @@ int i_APCI3XXX_InsnReadAnalogInput(struct comedi_device *dev,
535 dw_Temp = 535 dw_Temp =
536 dw_Temp 536 dw_Temp
537 & 1; 537 & 1;
538 } 538 } while (dw_Temp != 1);
539 while (dw_Temp != 1);
540 539
541 /*************************/ 540 /*************************/
542 /* Read the analog value */ 541 /* Read the analog value */
@@ -729,8 +728,7 @@ int i_APCI3XXX_InsnWriteAnalogOutput(struct comedi_device *dev,
729 dw_Status = 728 dw_Status =
730 readl((void *)(devpriv-> 729 readl((void *)(devpriv->
731 dw_AiBase + 96)); 730 dw_AiBase + 96));
732 } 731 } while ((dw_Status & 0x100) != 0x100);
733 while ((dw_Status & 0x100) != 0x100);
734 } else { 732 } else {
735 /***************************/ 733 /***************************/
736 /* Channel not initialised */ 734 /* Channel not initialised */