diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-08-03 04:07:45 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-08-22 20:29:26 -0400 |
commit | 4c89e88bfde6a3c179790e21004f24e09a058290 (patch) | |
tree | 2895a308d64aeabb5fde776d92572a51444d835b /drivers/net | |
parent | 1a53088c101789bfca431de709ff6e45e8c77003 (diff) |
pcmcia: deprecate CS_SUCCESS
Instead of using own error or success codes, the PCMCIA code should rely on
the generic return values. Therefore, replace all occurrences of CS_SUCCESS
with 0.
CC: netdev@vger.kernel.org
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/pcmcia/3c574_cs.c | 7 | ||||
-rw-r--r-- | drivers/net/pcmcia/3c589_cs.c | 7 | ||||
-rw-r--r-- | drivers/net/pcmcia/axnet_cs.c | 7 | ||||
-rw-r--r-- | drivers/net/pcmcia/com20020_cs.c | 8 | ||||
-rw-r--r-- | drivers/net/pcmcia/fmvj18x_cs.c | 19 | ||||
-rw-r--r-- | drivers/net/pcmcia/ibmtr_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/pcmcia/pcnet_cs.c | 7 | ||||
-rw-r--r-- | drivers/net/pcmcia/smc91c92_cs.c | 45 | ||||
-rw-r--r-- | drivers/net/wireless/b43/pcmcia.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_cs.c | 22 | ||||
-rw-r--r-- | drivers/net/wireless/netwave_cs.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ray_cs.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/wavelan_cs.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/wl3501_cs.c | 4 |
14 files changed, 90 insertions, 77 deletions
diff --git a/drivers/net/pcmcia/3c574_cs.c b/drivers/net/pcmcia/3c574_cs.c index 7112fd5e0e1b..08c4dd896077 100644 --- a/drivers/net/pcmcia/3c574_cs.c +++ b/drivers/net/pcmcia/3c574_cs.c | |||
@@ -355,9 +355,10 @@ static int tc574_config(struct pcmcia_device *link) | |||
355 | for (i = j = 0; j < 0x400; j += 0x20) { | 355 | for (i = j = 0; j < 0x400; j += 0x20) { |
356 | link->io.BasePort1 = j ^ 0x300; | 356 | link->io.BasePort1 = j ^ 0x300; |
357 | i = pcmcia_request_io(link, &link->io); | 357 | i = pcmcia_request_io(link, &link->io); |
358 | if (i == CS_SUCCESS) break; | 358 | if (i == 0) |
359 | break; | ||
359 | } | 360 | } |
360 | if (i != CS_SUCCESS) { | 361 | if (i != 0) { |
361 | cs_error(link, RequestIO, i); | 362 | cs_error(link, RequestIO, i); |
362 | goto failed; | 363 | goto failed; |
363 | } | 364 | } |
@@ -377,7 +378,7 @@ static int tc574_config(struct pcmcia_device *link) | |||
377 | tuple.TupleDataMax = 64; | 378 | tuple.TupleDataMax = 64; |
378 | tuple.TupleOffset = 0; | 379 | tuple.TupleOffset = 0; |
379 | tuple.DesiredTuple = 0x88; | 380 | tuple.DesiredTuple = 0x88; |
380 | if (pcmcia_get_first_tuple(link, &tuple) == CS_SUCCESS) { | 381 | if (pcmcia_get_first_tuple(link, &tuple) == 0) { |
381 | pcmcia_get_tuple_data(link, &tuple); | 382 | pcmcia_get_tuple_data(link, &tuple); |
382 | for (i = 0; i < 3; i++) | 383 | for (i = 0; i < 3; i++) |
383 | phys_addr[i] = htons(le16_to_cpu(buf[i])); | 384 | phys_addr[i] = htons(le16_to_cpu(buf[i])); |
diff --git a/drivers/net/pcmcia/3c589_cs.c b/drivers/net/pcmcia/3c589_cs.c index 549a64558420..0b28d0d8ffa8 100644 --- a/drivers/net/pcmcia/3c589_cs.c +++ b/drivers/net/pcmcia/3c589_cs.c | |||
@@ -278,9 +278,10 @@ static int tc589_config(struct pcmcia_device *link) | |||
278 | if (multi && (j & 0x80)) continue; | 278 | if (multi && (j & 0x80)) continue; |
279 | link->io.BasePort1 = j ^ 0x300; | 279 | link->io.BasePort1 = j ^ 0x300; |
280 | i = pcmcia_request_io(link, &link->io); | 280 | i = pcmcia_request_io(link, &link->io); |
281 | if (i == CS_SUCCESS) break; | 281 | if (i == 0) |
282 | break; | ||
282 | } | 283 | } |
283 | if (i != CS_SUCCESS) { | 284 | if (i != 0) { |
284 | cs_error(link, RequestIO, i); | 285 | cs_error(link, RequestIO, i); |
285 | goto failed; | 286 | goto failed; |
286 | } | 287 | } |
@@ -295,7 +296,7 @@ static int tc589_config(struct pcmcia_device *link) | |||
295 | /* The 3c589 has an extra EEPROM for configuration info, including | 296 | /* The 3c589 has an extra EEPROM for configuration info, including |
296 | the hardware address. The 3c562 puts the address in the CIS. */ | 297 | the hardware address. The 3c562 puts the address in the CIS. */ |
297 | tuple.DesiredTuple = 0x88; | 298 | tuple.DesiredTuple = 0x88; |
298 | if (pcmcia_get_first_tuple(link, &tuple) == CS_SUCCESS) { | 299 | if (pcmcia_get_first_tuple(link, &tuple) == 0) { |
299 | pcmcia_get_tuple_data(link, &tuple); | 300 | pcmcia_get_tuple_data(link, &tuple); |
300 | for (i = 0; i < 3; i++) | 301 | for (i = 0; i < 3; i++) |
301 | phys_addr[i] = htons(le16_to_cpu(buf[i])); | 302 | phys_addr[i] = htons(le16_to_cpu(buf[i])); |
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c index 061d889794c5..0bc641adce19 100644 --- a/drivers/net/pcmcia/axnet_cs.c +++ b/drivers/net/pcmcia/axnet_cs.c | |||
@@ -262,7 +262,7 @@ static int try_io_port(struct pcmcia_device *link) | |||
262 | if (link->io.NumPorts2 > 0) { | 262 | if (link->io.NumPorts2 > 0) { |
263 | /* for master/slave multifunction cards */ | 263 | /* for master/slave multifunction cards */ |
264 | link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; | 264 | link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; |
265 | link->irq.Attributes = | 265 | link->irq.Attributes = |
266 | IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; | 266 | IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; |
267 | } | 267 | } |
268 | } else { | 268 | } else { |
@@ -276,7 +276,8 @@ static int try_io_port(struct pcmcia_device *link) | |||
276 | link->io.BasePort1 = j ^ 0x300; | 276 | link->io.BasePort1 = j ^ 0x300; |
277 | link->io.BasePort2 = (j ^ 0x300) + 0x10; | 277 | link->io.BasePort2 = (j ^ 0x300) + 0x10; |
278 | ret = pcmcia_request_io(link, &link->io); | 278 | ret = pcmcia_request_io(link, &link->io); |
279 | if (ret == CS_SUCCESS) return ret; | 279 | if (ret == 0) |
280 | return ret; | ||
280 | } | 281 | } |
281 | return ret; | 282 | return ret; |
282 | } else { | 283 | } else { |
@@ -327,7 +328,7 @@ static int axnet_config(struct pcmcia_device *link) | |||
327 | /* don't trust the CIS on this; Linksys got it wrong */ | 328 | /* don't trust the CIS on this; Linksys got it wrong */ |
328 | link->conf.Present = 0x63; | 329 | link->conf.Present = 0x63; |
329 | last_ret = pcmcia_loop_config(link, axnet_configcheck, NULL); | 330 | last_ret = pcmcia_loop_config(link, axnet_configcheck, NULL); |
330 | if (last_ret != CS_SUCCESS) { | 331 | if (last_ret != 0) { |
331 | cs_error(link, RequestIO, last_ret); | 332 | cs_error(link, RequestIO, last_ret); |
332 | goto failed; | 333 | goto failed; |
333 | } | 334 | } |
diff --git a/drivers/net/pcmcia/com20020_cs.c b/drivers/net/pcmcia/com20020_cs.c index ea9414c4d900..831090c75622 100644 --- a/drivers/net/pcmcia/com20020_cs.c +++ b/drivers/net/pcmcia/com20020_cs.c | |||
@@ -260,21 +260,21 @@ static int com20020_config(struct pcmcia_device *link) | |||
260 | DEBUG(0, "com20020_config(0x%p)\n", link); | 260 | DEBUG(0, "com20020_config(0x%p)\n", link); |
261 | 261 | ||
262 | DEBUG(1,"arcnet: baseport1 is %Xh\n", link->io.BasePort1); | 262 | DEBUG(1,"arcnet: baseport1 is %Xh\n", link->io.BasePort1); |
263 | i = !CS_SUCCESS; | 263 | i = -ENODEV; |
264 | if (!link->io.BasePort1) | 264 | if (!link->io.BasePort1) |
265 | { | 265 | { |
266 | for (ioaddr = 0x100; ioaddr < 0x400; ioaddr += 0x10) | 266 | for (ioaddr = 0x100; ioaddr < 0x400; ioaddr += 0x10) |
267 | { | 267 | { |
268 | link->io.BasePort1 = ioaddr; | 268 | link->io.BasePort1 = ioaddr; |
269 | i = pcmcia_request_io(link, &link->io); | 269 | i = pcmcia_request_io(link, &link->io); |
270 | if (i == CS_SUCCESS) | 270 | if (i == 0) |
271 | break; | 271 | break; |
272 | } | 272 | } |
273 | } | 273 | } |
274 | else | 274 | else |
275 | i = pcmcia_request_io(link, &link->io); | 275 | i = pcmcia_request_io(link, &link->io); |
276 | 276 | ||
277 | if (i != CS_SUCCESS) | 277 | if (i != 0) |
278 | { | 278 | { |
279 | DEBUG(1,"arcnet: requestIO failed totally!\n"); | 279 | DEBUG(1,"arcnet: requestIO failed totally!\n"); |
280 | goto failed; | 280 | goto failed; |
@@ -287,7 +287,7 @@ static int com20020_config(struct pcmcia_device *link) | |||
287 | link->irq.AssignedIRQ, | 287 | link->irq.AssignedIRQ, |
288 | link->irq.IRQInfo1, link->irq.IRQInfo2); | 288 | link->irq.IRQInfo1, link->irq.IRQInfo2); |
289 | i = pcmcia_request_irq(link, &link->irq); | 289 | i = pcmcia_request_irq(link, &link->irq); |
290 | if (i != CS_SUCCESS) | 290 | if (i != 0) |
291 | { | 291 | { |
292 | DEBUG(1,"arcnet: requestIRQ failed totally!\n"); | 292 | DEBUG(1,"arcnet: requestIRQ failed totally!\n"); |
293 | goto failed; | 293 | goto failed; |
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c index a550c9bd126f..0ffd981502e1 100644 --- a/drivers/net/pcmcia/fmvj18x_cs.c +++ b/drivers/net/pcmcia/fmvj18x_cs.c | |||
@@ -309,7 +309,8 @@ static int mfc_try_io_port(struct pcmcia_device *link) | |||
309 | printk(KERN_NOTICE "fmvj18x_cs: out of resource for serial\n"); | 309 | printk(KERN_NOTICE "fmvj18x_cs: out of resource for serial\n"); |
310 | } | 310 | } |
311 | ret = pcmcia_request_io(link, &link->io); | 311 | ret = pcmcia_request_io(link, &link->io); |
312 | if (ret == CS_SUCCESS) return ret; | 312 | if (ret == 0) |
313 | return ret; | ||
313 | } | 314 | } |
314 | return ret; | 315 | return ret; |
315 | } | 316 | } |
@@ -325,7 +326,7 @@ static int ungermann_try_io_port(struct pcmcia_device *link) | |||
325 | for (ioaddr = 0x300; ioaddr < 0x3e0; ioaddr += 0x20) { | 326 | for (ioaddr = 0x300; ioaddr < 0x3e0; ioaddr += 0x20) { |
326 | link->io.BasePort1 = ioaddr; | 327 | link->io.BasePort1 = ioaddr; |
327 | ret = pcmcia_request_io(link, &link->io); | 328 | ret = pcmcia_request_io(link, &link->io); |
328 | if (ret == CS_SUCCESS) { | 329 | if (ret == 0) { |
329 | /* calculate ConfigIndex value */ | 330 | /* calculate ConfigIndex value */ |
330 | link->conf.ConfigIndex = | 331 | link->conf.ConfigIndex = |
331 | ((link->io.BasePort1 & 0x0f0) >> 3) | 0x22; | 332 | ((link->io.BasePort1 & 0x0f0) >> 3) | 0x22; |
@@ -356,7 +357,7 @@ static int fmvj18x_config(struct pcmcia_device *link) | |||
356 | tuple.TupleOffset = 0; | 357 | tuple.TupleOffset = 0; |
357 | tuple.DesiredTuple = CISTPL_FUNCE; | 358 | tuple.DesiredTuple = CISTPL_FUNCE; |
358 | tuple.TupleOffset = 0; | 359 | tuple.TupleOffset = 0; |
359 | if (pcmcia_get_first_tuple(link, &tuple) == CS_SUCCESS) { | 360 | if (pcmcia_get_first_tuple(link, &tuple) == 0) { |
360 | /* Yes, I have CISTPL_FUNCE. Let's check CISTPL_MANFID */ | 361 | /* Yes, I have CISTPL_FUNCE. Let's check CISTPL_MANFID */ |
361 | tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; | 362 | tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; |
362 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); | 363 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); |
@@ -430,10 +431,10 @@ static int fmvj18x_config(struct pcmcia_device *link) | |||
430 | link->irq.Attributes = | 431 | link->irq.Attributes = |
431 | IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED|IRQ_HANDLE_PRESENT; | 432 | IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED|IRQ_HANDLE_PRESENT; |
432 | ret = mfc_try_io_port(link); | 433 | ret = mfc_try_io_port(link); |
433 | if (ret != CS_SUCCESS) goto cs_failed; | 434 | if (ret != 0) goto cs_failed; |
434 | } else if (cardtype == UNGERMANN) { | 435 | } else if (cardtype == UNGERMANN) { |
435 | ret = ungermann_try_io_port(link); | 436 | ret = ungermann_try_io_port(link); |
436 | if (ret != CS_SUCCESS) goto cs_failed; | 437 | if (ret != 0) goto cs_failed; |
437 | } else { | 438 | } else { |
438 | CS_CHECK(RequestIO, pcmcia_request_io(link, &link->io)); | 439 | CS_CHECK(RequestIO, pcmcia_request_io(link, &link->io)); |
439 | } | 440 | } |
@@ -565,7 +566,7 @@ static int fmvj18x_get_hwinfo(struct pcmcia_device *link, u_char *node_id) | |||
565 | req.Base = 0; req.Size = 0; | 566 | req.Base = 0; req.Size = 0; |
566 | req.AccessSpeed = 0; | 567 | req.AccessSpeed = 0; |
567 | i = pcmcia_request_window(&link, &req, &link->win); | 568 | i = pcmcia_request_window(&link, &req, &link->win); |
568 | if (i != CS_SUCCESS) { | 569 | if (i != 0) { |
569 | cs_error(link, RequestWindow, i); | 570 | cs_error(link, RequestWindow, i); |
570 | return -1; | 571 | return -1; |
571 | } | 572 | } |
@@ -599,7 +600,7 @@ static int fmvj18x_get_hwinfo(struct pcmcia_device *link, u_char *node_id) | |||
599 | 600 | ||
600 | iounmap(base); | 601 | iounmap(base); |
601 | j = pcmcia_release_window(link->win); | 602 | j = pcmcia_release_window(link->win); |
602 | if (j != CS_SUCCESS) | 603 | if (j != 0) |
603 | cs_error(link, ReleaseWindow, j); | 604 | cs_error(link, ReleaseWindow, j); |
604 | return (i != 0x200) ? 0 : -1; | 605 | return (i != 0x200) ? 0 : -1; |
605 | 606 | ||
@@ -620,7 +621,7 @@ static int fmvj18x_setup_mfc(struct pcmcia_device *link) | |||
620 | req.Base = 0; req.Size = 0; | 621 | req.Base = 0; req.Size = 0; |
621 | req.AccessSpeed = 0; | 622 | req.AccessSpeed = 0; |
622 | i = pcmcia_request_window(&link, &req, &link->win); | 623 | i = pcmcia_request_window(&link, &req, &link->win); |
623 | if (i != CS_SUCCESS) { | 624 | if (i != 0) { |
624 | cs_error(link, RequestWindow, i); | 625 | cs_error(link, RequestWindow, i); |
625 | return -1; | 626 | return -1; |
626 | } | 627 | } |
@@ -642,7 +643,7 @@ static int fmvj18x_setup_mfc(struct pcmcia_device *link) | |||
642 | 643 | ||
643 | iounmap(base); | 644 | iounmap(base); |
644 | j = pcmcia_release_window(link->win); | 645 | j = pcmcia_release_window(link->win); |
645 | if (j != CS_SUCCESS) | 646 | if (j != 0) |
646 | cs_error(link, ReleaseWindow, j); | 647 | cs_error(link, ReleaseWindow, j); |
647 | return 0; | 648 | return 0; |
648 | 649 | ||
diff --git a/drivers/net/pcmcia/ibmtr_cs.c b/drivers/net/pcmcia/ibmtr_cs.c index 4eafa4f42cff..cf3cca4642f2 100644 --- a/drivers/net/pcmcia/ibmtr_cs.c +++ b/drivers/net/pcmcia/ibmtr_cs.c | |||
@@ -238,7 +238,7 @@ static int __devinit ibmtr_config(struct pcmcia_device *link) | |||
238 | /* Try PRIMARY card at 0xA20-0xA23 */ | 238 | /* Try PRIMARY card at 0xA20-0xA23 */ |
239 | link->io.BasePort1 = 0xA20; | 239 | link->io.BasePort1 = 0xA20; |
240 | i = pcmcia_request_io(link, &link->io); | 240 | i = pcmcia_request_io(link, &link->io); |
241 | if (i != CS_SUCCESS) { | 241 | if (i != 0) { |
242 | /* Couldn't get 0xA20-0xA23. Try ALTERNATE at 0xA24-0xA27. */ | 242 | /* Couldn't get 0xA20-0xA23. Try ALTERNATE at 0xA24-0xA27. */ |
243 | link->io.BasePort1 = 0xA24; | 243 | link->io.BasePort1 = 0xA24; |
244 | CS_CHECK(RequestIO, pcmcia_request_io(link, &link->io)); | 244 | CS_CHECK(RequestIO, pcmcia_request_io(link, &link->io)); |
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c index aa17434faa0e..1758952b3a38 100644 --- a/drivers/net/pcmcia/pcnet_cs.c +++ b/drivers/net/pcmcia/pcnet_cs.c | |||
@@ -310,7 +310,7 @@ static hw_info_t *get_hwinfo(struct pcmcia_device *link) | |||
310 | req.Base = 0; req.Size = 0; | 310 | req.Base = 0; req.Size = 0; |
311 | req.AccessSpeed = 0; | 311 | req.AccessSpeed = 0; |
312 | i = pcmcia_request_window(&link, &req, &link->win); | 312 | i = pcmcia_request_window(&link, &req, &link->win); |
313 | if (i != CS_SUCCESS) { | 313 | if (i != 0) { |
314 | cs_error(link, RequestWindow, i); | 314 | cs_error(link, RequestWindow, i); |
315 | return NULL; | 315 | return NULL; |
316 | } | 316 | } |
@@ -333,7 +333,7 @@ static hw_info_t *get_hwinfo(struct pcmcia_device *link) | |||
333 | 333 | ||
334 | iounmap(virt); | 334 | iounmap(virt); |
335 | j = pcmcia_release_window(link->win); | 335 | j = pcmcia_release_window(link->win); |
336 | if (j != CS_SUCCESS) | 336 | if (j != 0) |
337 | cs_error(link, ReleaseWindow, j); | 337 | cs_error(link, ReleaseWindow, j); |
338 | return (i < NR_INFO) ? hw_info+i : NULL; | 338 | return (i < NR_INFO) ? hw_info+i : NULL; |
339 | } /* get_hwinfo */ | 339 | } /* get_hwinfo */ |
@@ -504,7 +504,8 @@ static int try_io_port(struct pcmcia_device *link) | |||
504 | link->io.BasePort1 = j ^ 0x300; | 504 | link->io.BasePort1 = j ^ 0x300; |
505 | link->io.BasePort2 = (j ^ 0x300) + 0x10; | 505 | link->io.BasePort2 = (j ^ 0x300) + 0x10; |
506 | ret = pcmcia_request_io(link, &link->io); | 506 | ret = pcmcia_request_io(link, &link->io); |
507 | if (ret == CS_SUCCESS) return ret; | 507 | if (ret == 0) |
508 | return ret; | ||
508 | } | 509 | } |
509 | return ret; | 510 | return ret; |
510 | } else { | 511 | } else { |
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c index b3f2085ddca9..267cbe0afd16 100644 --- a/drivers/net/pcmcia/smc91c92_cs.c +++ b/drivers/net/pcmcia/smc91c92_cs.c | |||
@@ -409,8 +409,11 @@ static int first_tuple(struct pcmcia_device *handle, tuple_t *tuple, | |||
409 | { | 409 | { |
410 | int i; | 410 | int i; |
411 | 411 | ||
412 | if ((i = pcmcia_get_first_tuple(handle, tuple)) != CS_SUCCESS || | 412 | i = pcmcia_get_first_tuple(handle, tuple); |
413 | (i = pcmcia_get_tuple_data(handle, tuple)) != CS_SUCCESS) | 413 | if (i != 0) |
414 | return i; | ||
415 | i = pcmcia_get_tuple_data(handle, tuple); | ||
416 | if (i != 0) | ||
414 | return i; | 417 | return i; |
415 | return pcmcia_parse_tuple(handle, tuple, parse); | 418 | return pcmcia_parse_tuple(handle, tuple, parse); |
416 | } | 419 | } |
@@ -420,8 +423,8 @@ static int next_tuple(struct pcmcia_device *handle, tuple_t *tuple, | |||
420 | { | 423 | { |
421 | int i; | 424 | int i; |
422 | 425 | ||
423 | if ((i = pcmcia_get_next_tuple(handle, tuple)) != CS_SUCCESS || | 426 | if ((i = pcmcia_get_next_tuple(handle, tuple)) != 0 || |
424 | (i = pcmcia_get_tuple_data(handle, tuple)) != CS_SUCCESS) | 427 | (i = pcmcia_get_tuple_data(handle, tuple)) != 0) |
425 | return i; | 428 | return i; |
426 | return pcmcia_parse_tuple(handle, tuple, parse); | 429 | return pcmcia_parse_tuple(handle, tuple, parse); |
427 | } | 430 | } |
@@ -509,7 +512,7 @@ static int mhz_mfc_config(struct pcmcia_device *link) | |||
509 | req.Base = req.Size = 0; | 512 | req.Base = req.Size = 0; |
510 | req.AccessSpeed = 0; | 513 | req.AccessSpeed = 0; |
511 | i = pcmcia_request_window(&link, &req, &link->win); | 514 | i = pcmcia_request_window(&link, &req, &link->win); |
512 | if (i != CS_SUCCESS) | 515 | if (i != 0) |
513 | goto free_cfg_mem; | 516 | goto free_cfg_mem; |
514 | smc->base = ioremap(req.Base, req.Size); | 517 | smc->base = ioremap(req.Base, req.Size); |
515 | mem.CardOffset = mem.Page = 0; | 518 | mem.CardOffset = mem.Page = 0; |
@@ -517,7 +520,7 @@ static int mhz_mfc_config(struct pcmcia_device *link) | |||
517 | mem.CardOffset = link->conf.ConfigBase; | 520 | mem.CardOffset = link->conf.ConfigBase; |
518 | i = pcmcia_map_mem_page(link->win, &mem); | 521 | i = pcmcia_map_mem_page(link->win, &mem); |
519 | 522 | ||
520 | if ((i == CS_SUCCESS) | 523 | if ((i == 0) |
521 | && (smc->manfid == MANFID_MEGAHERTZ) | 524 | && (smc->manfid == MANFID_MEGAHERTZ) |
522 | && (smc->cardid == PRODID_MEGAHERTZ_EM3288)) | 525 | && (smc->cardid == PRODID_MEGAHERTZ_EM3288)) |
523 | mhz_3288_power(link); | 526 | mhz_3288_power(link); |
@@ -551,12 +554,12 @@ static int mhz_setup(struct pcmcia_device *link) | |||
551 | /* Read the station address from the CIS. It is stored as the last | 554 | /* Read the station address from the CIS. It is stored as the last |
552 | (fourth) string in the Version 1 Version/ID tuple. */ | 555 | (fourth) string in the Version 1 Version/ID tuple. */ |
553 | tuple->DesiredTuple = CISTPL_VERS_1; | 556 | tuple->DesiredTuple = CISTPL_VERS_1; |
554 | if (first_tuple(link, tuple, parse) != CS_SUCCESS) { | 557 | if (first_tuple(link, tuple, parse) != 0) { |
555 | rc = -1; | 558 | rc = -1; |
556 | goto free_cfg_mem; | 559 | goto free_cfg_mem; |
557 | } | 560 | } |
558 | /* Ugh -- the EM1144 card has two VERS_1 tuples!?! */ | 561 | /* Ugh -- the EM1144 card has two VERS_1 tuples!?! */ |
559 | if (next_tuple(link, tuple, parse) != CS_SUCCESS) | 562 | if (next_tuple(link, tuple, parse) != 0) |
560 | first_tuple(link, tuple, parse); | 563 | first_tuple(link, tuple, parse); |
561 | if (parse->version_1.ns > 3) { | 564 | if (parse->version_1.ns > 3) { |
562 | station_addr = parse->version_1.str + parse->version_1.ofs[3]; | 565 | station_addr = parse->version_1.str + parse->version_1.ofs[3]; |
@@ -568,11 +571,11 @@ static int mhz_setup(struct pcmcia_device *link) | |||
568 | 571 | ||
569 | /* Another possibility: for the EM3288, in a special tuple */ | 572 | /* Another possibility: for the EM3288, in a special tuple */ |
570 | tuple->DesiredTuple = 0x81; | 573 | tuple->DesiredTuple = 0x81; |
571 | if (pcmcia_get_first_tuple(link, tuple) != CS_SUCCESS) { | 574 | if (pcmcia_get_first_tuple(link, tuple) != 0) { |
572 | rc = -1; | 575 | rc = -1; |
573 | goto free_cfg_mem; | 576 | goto free_cfg_mem; |
574 | } | 577 | } |
575 | if (pcmcia_get_tuple_data(link, tuple) != CS_SUCCESS) { | 578 | if (pcmcia_get_tuple_data(link, tuple) != 0) { |
576 | rc = -1; | 579 | rc = -1; |
577 | goto free_cfg_mem; | 580 | goto free_cfg_mem; |
578 | } | 581 | } |
@@ -700,12 +703,12 @@ static int smc_setup(struct pcmcia_device *link) | |||
700 | /* Check for a LAN function extension tuple */ | 703 | /* Check for a LAN function extension tuple */ |
701 | tuple->DesiredTuple = CISTPL_FUNCE; | 704 | tuple->DesiredTuple = CISTPL_FUNCE; |
702 | i = first_tuple(link, tuple, parse); | 705 | i = first_tuple(link, tuple, parse); |
703 | while (i == CS_SUCCESS) { | 706 | while (i == 0) { |
704 | if (parse->funce.type == CISTPL_FUNCE_LAN_NODE_ID) | 707 | if (parse->funce.type == CISTPL_FUNCE_LAN_NODE_ID) |
705 | break; | 708 | break; |
706 | i = next_tuple(link, tuple, parse); | 709 | i = next_tuple(link, tuple, parse); |
707 | } | 710 | } |
708 | if (i == CS_SUCCESS) { | 711 | if (i == 0) { |
709 | node_id = (cistpl_lan_node_id_t *)parse->funce.data; | 712 | node_id = (cistpl_lan_node_id_t *)parse->funce.data; |
710 | if (node_id->nb == 6) { | 713 | if (node_id->nb == 6) { |
711 | for (i = 0; i < 6; i++) | 714 | for (i = 0; i < 6; i++) |
@@ -752,9 +755,10 @@ static int osi_config(struct pcmcia_device *link) | |||
752 | for (i = j = 0; j < 4; j++) { | 755 | for (i = j = 0; j < 4; j++) { |
753 | link->io.BasePort2 = com[j]; | 756 | link->io.BasePort2 = com[j]; |
754 | i = pcmcia_request_io(link, &link->io); | 757 | i = pcmcia_request_io(link, &link->io); |
755 | if (i == CS_SUCCESS) break; | 758 | if (i == 0) |
759 | break; | ||
756 | } | 760 | } |
757 | if (i != CS_SUCCESS) { | 761 | if (i != 0) { |
758 | /* Fallback: turn off hard decode */ | 762 | /* Fallback: turn off hard decode */ |
759 | link->conf.ConfigIndex = 0x03; | 763 | link->conf.ConfigIndex = 0x03; |
760 | link->io.NumPorts2 = 0; | 764 | link->io.NumPorts2 = 0; |
@@ -787,13 +791,13 @@ static int osi_setup(struct pcmcia_device *link, u_short manfid, u_short cardid) | |||
787 | /* Read the station address from tuple 0x90, subtuple 0x04 */ | 791 | /* Read the station address from tuple 0x90, subtuple 0x04 */ |
788 | tuple->DesiredTuple = 0x90; | 792 | tuple->DesiredTuple = 0x90; |
789 | i = pcmcia_get_first_tuple(link, tuple); | 793 | i = pcmcia_get_first_tuple(link, tuple); |
790 | while (i == CS_SUCCESS) { | 794 | while (i == 0) { |
791 | i = pcmcia_get_tuple_data(link, tuple); | 795 | i = pcmcia_get_tuple_data(link, tuple); |
792 | if ((i != CS_SUCCESS) || (buf[0] == 0x04)) | 796 | if ((i != 0) || (buf[0] == 0x04)) |
793 | break; | 797 | break; |
794 | i = pcmcia_get_next_tuple(link, tuple); | 798 | i = pcmcia_get_next_tuple(link, tuple); |
795 | } | 799 | } |
796 | if (i != CS_SUCCESS) { | 800 | if (i != 0) { |
797 | rc = -1; | 801 | rc = -1; |
798 | goto free_cfg_mem; | 802 | goto free_cfg_mem; |
799 | } | 803 | } |
@@ -931,8 +935,11 @@ static int check_sig(struct pcmcia_device *link) | |||
931 | 935 | ||
932 | ======================================================================*/ | 936 | ======================================================================*/ |
933 | 937 | ||
934 | #define CS_EXIT_TEST(ret, svc, label) \ | 938 | #define CS_EXIT_TEST(ret, svc, label) \ |
935 | if (ret != CS_SUCCESS) { cs_error(link, svc, ret); goto label; } | 939 | if (ret != 0) { \ |
940 | cs_error(link, svc, ret); \ | ||
941 | goto label; \ | ||
942 | } | ||
936 | 943 | ||
937 | static int smc91c92_config(struct pcmcia_device *link) | 944 | static int smc91c92_config(struct pcmcia_device *link) |
938 | { | 945 | { |
diff --git a/drivers/net/wireless/b43/pcmcia.c b/drivers/net/wireless/b43/pcmcia.c index b8aa16307f79..ab42fb6addf6 100644 --- a/drivers/net/wireless/b43/pcmcia.c +++ b/drivers/net/wireless/b43/pcmcia.c | |||
@@ -82,13 +82,13 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev) | |||
82 | tuple.TupleOffset = 0; | 82 | tuple.TupleOffset = 0; |
83 | 83 | ||
84 | res = pcmcia_get_first_tuple(dev, &tuple); | 84 | res = pcmcia_get_first_tuple(dev, &tuple); |
85 | if (res != CS_SUCCESS) | 85 | if (res != 0) |
86 | goto err_kfree_ssb; | 86 | goto err_kfree_ssb; |
87 | res = pcmcia_get_tuple_data(dev, &tuple); | 87 | res = pcmcia_get_tuple_data(dev, &tuple); |
88 | if (res != CS_SUCCESS) | 88 | if (res != 0) |
89 | goto err_kfree_ssb; | 89 | goto err_kfree_ssb; |
90 | res = pcmcia_parse_tuple(dev, &tuple, &parse); | 90 | res = pcmcia_parse_tuple(dev, &tuple, &parse); |
91 | if (res != CS_SUCCESS) | 91 | if (res != 0) |
92 | goto err_kfree_ssb; | 92 | goto err_kfree_ssb; |
93 | 93 | ||
94 | dev->conf.ConfigBase = parse.config.base; | 94 | dev->conf.ConfigBase = parse.config.base; |
@@ -107,13 +107,13 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev) | |||
107 | win.Size = SSB_CORE_SIZE; | 107 | win.Size = SSB_CORE_SIZE; |
108 | win.AccessSpeed = 250; | 108 | win.AccessSpeed = 250; |
109 | res = pcmcia_request_window(&dev, &win, &dev->win); | 109 | res = pcmcia_request_window(&dev, &win, &dev->win); |
110 | if (res != CS_SUCCESS) | 110 | if (res != 0) |
111 | goto err_kfree_ssb; | 111 | goto err_kfree_ssb; |
112 | 112 | ||
113 | mem.CardOffset = 0; | 113 | mem.CardOffset = 0; |
114 | mem.Page = 0; | 114 | mem.Page = 0; |
115 | res = pcmcia_map_mem_page(dev->win, &mem); | 115 | res = pcmcia_map_mem_page(dev->win, &mem); |
116 | if (res != CS_SUCCESS) | 116 | if (res != 0) |
117 | goto err_disable; | 117 | goto err_disable; |
118 | 118 | ||
119 | dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | 119 | dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; |
@@ -121,11 +121,11 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev) | |||
121 | dev->irq.Handler = NULL; /* The handler is registered later. */ | 121 | dev->irq.Handler = NULL; /* The handler is registered later. */ |
122 | dev->irq.Instance = NULL; | 122 | dev->irq.Instance = NULL; |
123 | res = pcmcia_request_irq(dev, &dev->irq); | 123 | res = pcmcia_request_irq(dev, &dev->irq); |
124 | if (res != CS_SUCCESS) | 124 | if (res != 0) |
125 | goto err_disable; | 125 | goto err_disable; |
126 | 126 | ||
127 | res = pcmcia_request_configuration(dev, &dev->conf); | 127 | res = pcmcia_request_configuration(dev, &dev->conf); |
128 | if (res != CS_SUCCESS) | 128 | if (res != 0) |
129 | goto err_disable; | 129 | goto err_disable; |
130 | 130 | ||
131 | err = ssb_bus_pcmciabus_register(ssb, dev, win.Base); | 131 | err = ssb_bus_pcmciabus_register(ssb, dev, win.Base); |
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c index c768d42d5177..2826e674a8e7 100644 --- a/drivers/net/wireless/hostap/hostap_cs.c +++ b/drivers/net/wireless/hostap/hostap_cs.c | |||
@@ -234,7 +234,7 @@ static void sandisk_set_iobase(local_info_t *local) | |||
234 | reg.Value = hw_priv->link->io.BasePort1 & 0x00ff; | 234 | reg.Value = hw_priv->link->io.BasePort1 & 0x00ff; |
235 | res = pcmcia_access_configuration_register(hw_priv->link, | 235 | res = pcmcia_access_configuration_register(hw_priv->link, |
236 | ®); | 236 | ®); |
237 | if (res != CS_SUCCESS) { | 237 | if (res != 0) { |
238 | printk(KERN_DEBUG "Prism3 SanDisk - failed to set I/O base 0 -" | 238 | printk(KERN_DEBUG "Prism3 SanDisk - failed to set I/O base 0 -" |
239 | " res=%d\n", res); | 239 | " res=%d\n", res); |
240 | } | 240 | } |
@@ -246,7 +246,7 @@ static void sandisk_set_iobase(local_info_t *local) | |||
246 | reg.Value = (hw_priv->link->io.BasePort1 & 0xff00) >> 8; | 246 | reg.Value = (hw_priv->link->io.BasePort1 & 0xff00) >> 8; |
247 | res = pcmcia_access_configuration_register(hw_priv->link, | 247 | res = pcmcia_access_configuration_register(hw_priv->link, |
248 | ®); | 248 | ®); |
249 | if (res != CS_SUCCESS) { | 249 | if (res != 0) { |
250 | printk(KERN_DEBUG "Prism3 SanDisk - failed to set I/O base 1 -" | 250 | printk(KERN_DEBUG "Prism3 SanDisk - failed to set I/O base 1 -" |
251 | " res=%d\n", res); | 251 | " res=%d\n", res); |
252 | } | 252 | } |
@@ -322,7 +322,7 @@ static int sandisk_enable_wireless(struct net_device *dev) | |||
322 | reg.Value = COR_SOFT_RESET; | 322 | reg.Value = COR_SOFT_RESET; |
323 | res = pcmcia_access_configuration_register(hw_priv->link, | 323 | res = pcmcia_access_configuration_register(hw_priv->link, |
324 | ®); | 324 | ®); |
325 | if (res != CS_SUCCESS) { | 325 | if (res != 0) { |
326 | printk(KERN_DEBUG "%s: SanDisk - COR sreset failed (%d)\n", | 326 | printk(KERN_DEBUG "%s: SanDisk - COR sreset failed (%d)\n", |
327 | dev->name, res); | 327 | dev->name, res); |
328 | goto done; | 328 | goto done; |
@@ -339,7 +339,7 @@ static int sandisk_enable_wireless(struct net_device *dev) | |||
339 | reg.Value = COR_LEVEL_REQ | 0x8 | COR_ADDR_DECODE | COR_FUNC_ENA; | 339 | reg.Value = COR_LEVEL_REQ | 0x8 | COR_ADDR_DECODE | COR_FUNC_ENA; |
340 | res = pcmcia_access_configuration_register(hw_priv->link, | 340 | res = pcmcia_access_configuration_register(hw_priv->link, |
341 | ®); | 341 | ®); |
342 | if (res != CS_SUCCESS) { | 342 | if (res != 0) { |
343 | printk(KERN_DEBUG "%s: SanDisk - COR sreset failed (%d)\n", | 343 | printk(KERN_DEBUG "%s: SanDisk - COR sreset failed (%d)\n", |
344 | dev->name, res); | 344 | dev->name, res); |
345 | goto done; | 345 | goto done; |
@@ -374,7 +374,7 @@ static void prism2_pccard_cor_sreset(local_info_t *local) | |||
374 | reg.Value = 0; | 374 | reg.Value = 0; |
375 | res = pcmcia_access_configuration_register(hw_priv->link, | 375 | res = pcmcia_access_configuration_register(hw_priv->link, |
376 | ®); | 376 | ®); |
377 | if (res != CS_SUCCESS) { | 377 | if (res != 0) { |
378 | printk(KERN_DEBUG "prism2_pccard_cor_sreset failed 1 (%d)\n", | 378 | printk(KERN_DEBUG "prism2_pccard_cor_sreset failed 1 (%d)\n", |
379 | res); | 379 | res); |
380 | return; | 380 | return; |
@@ -386,7 +386,7 @@ static void prism2_pccard_cor_sreset(local_info_t *local) | |||
386 | reg.Value |= COR_SOFT_RESET; | 386 | reg.Value |= COR_SOFT_RESET; |
387 | res = pcmcia_access_configuration_register(hw_priv->link, | 387 | res = pcmcia_access_configuration_register(hw_priv->link, |
388 | ®); | 388 | ®); |
389 | if (res != CS_SUCCESS) { | 389 | if (res != 0) { |
390 | printk(KERN_DEBUG "prism2_pccard_cor_sreset failed 2 (%d)\n", | 390 | printk(KERN_DEBUG "prism2_pccard_cor_sreset failed 2 (%d)\n", |
391 | res); | 391 | res); |
392 | return; | 392 | return; |
@@ -399,7 +399,7 @@ static void prism2_pccard_cor_sreset(local_info_t *local) | |||
399 | reg.Value |= COR_IREQ_ENA; | 399 | reg.Value |= COR_IREQ_ENA; |
400 | res = pcmcia_access_configuration_register(hw_priv->link, | 400 | res = pcmcia_access_configuration_register(hw_priv->link, |
401 | ®); | 401 | ®); |
402 | if (res != CS_SUCCESS) { | 402 | if (res != 0) { |
403 | printk(KERN_DEBUG "prism2_pccard_cor_sreset failed 3 (%d)\n", | 403 | printk(KERN_DEBUG "prism2_pccard_cor_sreset failed 3 (%d)\n", |
404 | res); | 404 | res); |
405 | return; | 405 | return; |
@@ -433,7 +433,7 @@ static void prism2_pccard_genesis_reset(local_info_t *local, int hcr) | |||
433 | reg.Value = 0; | 433 | reg.Value = 0; |
434 | res = pcmcia_access_configuration_register(hw_priv->link, | 434 | res = pcmcia_access_configuration_register(hw_priv->link, |
435 | ®); | 435 | ®); |
436 | if (res != CS_SUCCESS) { | 436 | if (res != 0) { |
437 | printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 1 " | 437 | printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 1 " |
438 | "(%d)\n", res); | 438 | "(%d)\n", res); |
439 | return; | 439 | return; |
@@ -446,7 +446,7 @@ static void prism2_pccard_genesis_reset(local_info_t *local, int hcr) | |||
446 | reg.Value |= COR_SOFT_RESET; | 446 | reg.Value |= COR_SOFT_RESET; |
447 | res = pcmcia_access_configuration_register(hw_priv->link, | 447 | res = pcmcia_access_configuration_register(hw_priv->link, |
448 | ®); | 448 | ®); |
449 | if (res != CS_SUCCESS) { | 449 | if (res != 0) { |
450 | printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 2 " | 450 | printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 2 " |
451 | "(%d)\n", res); | 451 | "(%d)\n", res); |
452 | return; | 452 | return; |
@@ -460,7 +460,7 @@ static void prism2_pccard_genesis_reset(local_info_t *local, int hcr) | |||
460 | reg.Offset = CISREG_CCSR; | 460 | reg.Offset = CISREG_CCSR; |
461 | res = pcmcia_access_configuration_register(hw_priv->link, | 461 | res = pcmcia_access_configuration_register(hw_priv->link, |
462 | ®); | 462 | ®); |
463 | if (res != CS_SUCCESS) { | 463 | if (res != 0) { |
464 | printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 3 " | 464 | printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 3 " |
465 | "(%d)\n", res); | 465 | "(%d)\n", res); |
466 | return; | 466 | return; |
@@ -472,7 +472,7 @@ static void prism2_pccard_genesis_reset(local_info_t *local, int hcr) | |||
472 | reg.Value = old_cor & ~COR_SOFT_RESET; | 472 | reg.Value = old_cor & ~COR_SOFT_RESET; |
473 | res = pcmcia_access_configuration_register(hw_priv->link, | 473 | res = pcmcia_access_configuration_register(hw_priv->link, |
474 | ®); | 474 | ®); |
475 | if (res != CS_SUCCESS) { | 475 | if (res != 0) { |
476 | printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 4 " | 476 | printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 4 " |
477 | "(%d)\n", res); | 477 | "(%d)\n", res); |
478 | return; | 478 | return; |
diff --git a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c index f479c1af6782..bf2dd1057928 100644 --- a/drivers/net/wireless/netwave_cs.c +++ b/drivers/net/wireless/netwave_cs.c | |||
@@ -749,9 +749,10 @@ static int netwave_pcmcia_config(struct pcmcia_device *link) { | |||
749 | for (i = j = 0x0; j < 0x400; j += 0x20) { | 749 | for (i = j = 0x0; j < 0x400; j += 0x20) { |
750 | link->io.BasePort1 = j ^ 0x300; | 750 | link->io.BasePort1 = j ^ 0x300; |
751 | i = pcmcia_request_io(link, &link->io); | 751 | i = pcmcia_request_io(link, &link->io); |
752 | if (i == CS_SUCCESS) break; | 752 | if (i == 0) |
753 | break; | ||
753 | } | 754 | } |
754 | if (i != CS_SUCCESS) { | 755 | if (i != 0) { |
755 | cs_error(link, RequestIO, i); | 756 | cs_error(link, RequestIO, i); |
756 | goto failed; | 757 | goto failed; |
757 | } | 758 | } |
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c index 963960dc30f2..99c7c8bc2573 100644 --- a/drivers/net/wireless/ray_cs.c +++ b/drivers/net/wireless/ray_cs.c | |||
@@ -798,9 +798,9 @@ static void ray_release(struct pcmcia_device *link) | |||
798 | iounmap(local->amem); | 798 | iounmap(local->amem); |
799 | /* Do bother checking to see if these succeed or not */ | 799 | /* Do bother checking to see if these succeed or not */ |
800 | i = pcmcia_release_window(local->amem_handle); | 800 | i = pcmcia_release_window(local->amem_handle); |
801 | if ( i != CS_SUCCESS ) DEBUG(0,"ReleaseWindow(local->amem) ret = %x\n",i); | 801 | if ( i != 0 ) DEBUG(0,"ReleaseWindow(local->amem) ret = %x\n",i); |
802 | i = pcmcia_release_window(local->rmem_handle); | 802 | i = pcmcia_release_window(local->rmem_handle); |
803 | if ( i != CS_SUCCESS ) DEBUG(0,"ReleaseWindow(local->rmem) ret = %x\n",i); | 803 | if ( i != 0 ) DEBUG(0,"ReleaseWindow(local->rmem) ret = %x\n",i); |
804 | pcmcia_disable_device(link); | 804 | pcmcia_disable_device(link); |
805 | 805 | ||
806 | DEBUG(2,"ray_release ending\n"); | 806 | DEBUG(2,"ray_release ending\n"); |
diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c index b584c0ecc62d..fee9a0250534 100644 --- a/drivers/net/wireless/wavelan_cs.c +++ b/drivers/net/wireless/wavelan_cs.c | |||
@@ -3708,7 +3708,7 @@ wv_pcmcia_reset(struct net_device * dev) | |||
3708 | #endif | 3708 | #endif |
3709 | 3709 | ||
3710 | i = pcmcia_access_configuration_register(link, ®); | 3710 | i = pcmcia_access_configuration_register(link, ®); |
3711 | if(i != CS_SUCCESS) | 3711 | if (i != 0) |
3712 | { | 3712 | { |
3713 | cs_error(link, AccessConfigurationRegister, i); | 3713 | cs_error(link, AccessConfigurationRegister, i); |
3714 | return FALSE; | 3714 | return FALSE; |
@@ -3722,7 +3722,7 @@ wv_pcmcia_reset(struct net_device * dev) | |||
3722 | reg.Action = CS_WRITE; | 3722 | reg.Action = CS_WRITE; |
3723 | reg.Value = reg.Value | COR_SW_RESET; | 3723 | reg.Value = reg.Value | COR_SW_RESET; |
3724 | i = pcmcia_access_configuration_register(link, ®); | 3724 | i = pcmcia_access_configuration_register(link, ®); |
3725 | if(i != CS_SUCCESS) | 3725 | if (i != 0) |
3726 | { | 3726 | { |
3727 | cs_error(link, AccessConfigurationRegister, i); | 3727 | cs_error(link, AccessConfigurationRegister, i); |
3728 | return FALSE; | 3728 | return FALSE; |
@@ -3731,7 +3731,7 @@ wv_pcmcia_reset(struct net_device * dev) | |||
3731 | reg.Action = CS_WRITE; | 3731 | reg.Action = CS_WRITE; |
3732 | reg.Value = COR_LEVEL_IRQ | COR_CONFIG; | 3732 | reg.Value = COR_LEVEL_IRQ | COR_CONFIG; |
3733 | i = pcmcia_access_configuration_register(link, ®); | 3733 | i = pcmcia_access_configuration_register(link, ®); |
3734 | if(i != CS_SUCCESS) | 3734 | if (i != 0) |
3735 | { | 3735 | { |
3736 | cs_error(link, AccessConfigurationRegister, i); | 3736 | cs_error(link, AccessConfigurationRegister, i); |
3737 | return FALSE; | 3737 | return FALSE; |
@@ -3909,7 +3909,7 @@ wv_pcmcia_config(struct pcmcia_device * link) | |||
3909 | do | 3909 | do |
3910 | { | 3910 | { |
3911 | i = pcmcia_request_io(link, &link->io); | 3911 | i = pcmcia_request_io(link, &link->io); |
3912 | if(i != CS_SUCCESS) | 3912 | if (i != 0) |
3913 | { | 3913 | { |
3914 | cs_error(link, RequestIO, i); | 3914 | cs_error(link, RequestIO, i); |
3915 | break; | 3915 | break; |
@@ -3920,7 +3920,7 @@ wv_pcmcia_config(struct pcmcia_device * link) | |||
3920 | * actually assign a handler to the interrupt. | 3920 | * actually assign a handler to the interrupt. |
3921 | */ | 3921 | */ |
3922 | i = pcmcia_request_irq(link, &link->irq); | 3922 | i = pcmcia_request_irq(link, &link->irq); |
3923 | if(i != CS_SUCCESS) | 3923 | if (i != 0) |
3924 | { | 3924 | { |
3925 | cs_error(link, RequestIRQ, i); | 3925 | cs_error(link, RequestIRQ, i); |
3926 | break; | 3926 | break; |
@@ -3932,7 +3932,7 @@ wv_pcmcia_config(struct pcmcia_device * link) | |||
3932 | */ | 3932 | */ |
3933 | link->conf.ConfigIndex = 1; | 3933 | link->conf.ConfigIndex = 1; |
3934 | i = pcmcia_request_configuration(link, &link->conf); | 3934 | i = pcmcia_request_configuration(link, &link->conf); |
3935 | if(i != CS_SUCCESS) | 3935 | if (i != 0) |
3936 | { | 3936 | { |
3937 | cs_error(link, RequestConfiguration, i); | 3937 | cs_error(link, RequestConfiguration, i); |
3938 | break; | 3938 | break; |
@@ -3948,7 +3948,7 @@ wv_pcmcia_config(struct pcmcia_device * link) | |||
3948 | req.Base = req.Size = 0; | 3948 | req.Base = req.Size = 0; |
3949 | req.AccessSpeed = mem_speed; | 3949 | req.AccessSpeed = mem_speed; |
3950 | i = pcmcia_request_window(&link, &req, &link->win); | 3950 | i = pcmcia_request_window(&link, &req, &link->win); |
3951 | if(i != CS_SUCCESS) | 3951 | if (i != 0) |
3952 | { | 3952 | { |
3953 | cs_error(link, RequestWindow, i); | 3953 | cs_error(link, RequestWindow, i); |
3954 | break; | 3954 | break; |
@@ -3960,7 +3960,7 @@ wv_pcmcia_config(struct pcmcia_device * link) | |||
3960 | 3960 | ||
3961 | mem.CardOffset = 0; mem.Page = 0; | 3961 | mem.CardOffset = 0; mem.Page = 0; |
3962 | i = pcmcia_map_mem_page(link->win, &mem); | 3962 | i = pcmcia_map_mem_page(link->win, &mem); |
3963 | if(i != CS_SUCCESS) | 3963 | if (i != 0) |
3964 | { | 3964 | { |
3965 | cs_error(link, MapMemPage, i); | 3965 | cs_error(link, MapMemPage, i); |
3966 | break; | 3966 | break; |
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c index 377141995e36..969f53fd705b 100644 --- a/drivers/net/wireless/wl3501_cs.c +++ b/drivers/net/wireless/wl3501_cs.c | |||
@@ -1977,10 +1977,10 @@ static int wl3501_config(struct pcmcia_device *link) | |||
1977 | link->io.BasePort1 = j; | 1977 | link->io.BasePort1 = j; |
1978 | link->io.BasePort2 = link->io.BasePort1 + 0x10; | 1978 | link->io.BasePort2 = link->io.BasePort1 + 0x10; |
1979 | i = pcmcia_request_io(link, &link->io); | 1979 | i = pcmcia_request_io(link, &link->io); |
1980 | if (i == CS_SUCCESS) | 1980 | if (i == 0) |
1981 | break; | 1981 | break; |
1982 | } | 1982 | } |
1983 | if (i != CS_SUCCESS) { | 1983 | if (i != 0) { |
1984 | cs_error(link, RequestIO, i); | 1984 | cs_error(link, RequestIO, i); |
1985 | goto failed; | 1985 | goto failed; |
1986 | } | 1986 | } |