diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2009-10-24 09:53:36 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2009-11-09 02:30:02 -0500 |
commit | 2caff14713d53abba273e6095495788e2720f756 (patch) | |
tree | d22eeea544d7a746a8c107322602d0da77450dff /drivers/net/wireless/hostap | |
parent | 624dd66957e53e15cf40e937b50597c4d41f0e99 (diff) |
pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (wireless)
Convert PCMCIA drivers to use the dynamic debug infrastructure, instead of
requiring manual settings of PCMCIA_DEBUG.
Also, remove all usages of the CS_CHECK macro and replace them with proper
Linux style calling and return value checking. The extra error reporting may
be dropped, as the PCMCIA core already complains about any (non-driver-author)
errors.
CC: linux-wireless@vger.kernel.org
CC: netdev@vger.kernel.org
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/net/wireless/hostap')
-rw-r--r-- | drivers/net/wireless/hostap/hostap_cs.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c index 31b60dd87bfe..ca3ab849ac03 100644 --- a/drivers/net/wireless/hostap/hostap_cs.c +++ b/drivers/net/wireless/hostap/hostap_cs.c | |||
@@ -510,10 +510,6 @@ static void prism2_detach(struct pcmcia_device *link) | |||
510 | } | 510 | } |
511 | 511 | ||
512 | 512 | ||
513 | #define CS_CHECK(fn, ret) \ | ||
514 | do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) | ||
515 | |||
516 | |||
517 | /* run after a CARD_INSERTION event is received to configure the PCMCIA | 513 | /* run after a CARD_INSERTION event is received to configure the PCMCIA |
518 | * socket and make the device available to the system */ | 514 | * socket and make the device available to the system */ |
519 | 515 | ||
@@ -605,7 +601,6 @@ static int prism2_config(struct pcmcia_device *link) | |||
605 | struct hostap_interface *iface; | 601 | struct hostap_interface *iface; |
606 | local_info_t *local; | 602 | local_info_t *local; |
607 | int ret = 1; | 603 | int ret = 1; |
608 | int last_fn, last_ret; | ||
609 | struct hostap_cs_priv *hw_priv; | 604 | struct hostap_cs_priv *hw_priv; |
610 | 605 | ||
611 | PDEBUG(DEBUG_FLOW, "prism2_config()\n"); | 606 | PDEBUG(DEBUG_FLOW, "prism2_config()\n"); |
@@ -617,13 +612,12 @@ static int prism2_config(struct pcmcia_device *link) | |||
617 | } | 612 | } |
618 | 613 | ||
619 | /* Look for an appropriate configuration table entry in the CIS */ | 614 | /* Look for an appropriate configuration table entry in the CIS */ |
620 | last_ret = pcmcia_loop_config(link, prism2_config_check, NULL); | 615 | ret = pcmcia_loop_config(link, prism2_config_check, NULL); |
621 | if (last_ret) { | 616 | if (ret) { |
622 | if (!ignore_cis_vcc) | 617 | if (!ignore_cis_vcc) |
623 | printk(KERN_ERR "GetNextTuple(): No matching " | 618 | printk(KERN_ERR "GetNextTuple(): No matching " |
624 | "CIS configuration. Maybe you need the " | 619 | "CIS configuration. Maybe you need the " |
625 | "ignore_cis_vcc=1 parameter.\n"); | 620 | "ignore_cis_vcc=1 parameter.\n"); |
626 | cs_error(link, RequestIO, last_ret); | ||
627 | goto failed; | 621 | goto failed; |
628 | } | 622 | } |
629 | 623 | ||
@@ -652,8 +646,9 @@ static int prism2_config(struct pcmcia_device *link) | |||
652 | link->irq.IRQInfo1 = IRQ_LEVEL_ID; | 646 | link->irq.IRQInfo1 = IRQ_LEVEL_ID; |
653 | link->irq.Handler = prism2_interrupt; | 647 | link->irq.Handler = prism2_interrupt; |
654 | link->irq.Instance = dev; | 648 | link->irq.Instance = dev; |
655 | CS_CHECK(RequestIRQ, | 649 | ret = pcmcia_request_irq(link, &link->irq); |
656 | pcmcia_request_irq(link, &link->irq)); | 650 | if (ret) |
651 | goto failed; | ||
657 | } | 652 | } |
658 | 653 | ||
659 | /* | 654 | /* |
@@ -661,8 +656,9 @@ static int prism2_config(struct pcmcia_device *link) | |||
661 | * the I/O windows and the interrupt mapping, and putting the | 656 | * the I/O windows and the interrupt mapping, and putting the |
662 | * card and host interface into "Memory and IO" mode. | 657 | * card and host interface into "Memory and IO" mode. |
663 | */ | 658 | */ |
664 | CS_CHECK(RequestConfiguration, | 659 | ret = pcmcia_request_configuration(link, &link->conf); |
665 | pcmcia_request_configuration(link, &link->conf)); | 660 | if (ret) |
661 | goto failed; | ||
666 | 662 | ||
667 | dev->irq = link->irq.AssignedIRQ; | 663 | dev->irq = link->irq.AssignedIRQ; |
668 | dev->base_addr = link->io.BasePort1; | 664 | dev->base_addr = link->io.BasePort1; |
@@ -695,9 +691,6 @@ static int prism2_config(struct pcmcia_device *link) | |||
695 | } | 691 | } |
696 | return ret; | 692 | return ret; |
697 | 693 | ||
698 | cs_failed: | ||
699 | cs_error(link, last_fn, last_ret); | ||
700 | |||
701 | failed: | 694 | failed: |
702 | kfree(hw_priv); | 695 | kfree(hw_priv); |
703 | prism2_release((u_long)link); | 696 | prism2_release((u_long)link); |