diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-03-07 06:21:16 -0500 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-05-10 04:23:13 -0400 |
commit | eb14120f743d29744d9475bffec56ff4ad43a749 (patch) | |
tree | 56857094d2b0cfc0ecbd1685f18d6edbe78e140f /drivers/net/wireless/hostap | |
parent | a7debe789dfcaee9c4d81e5738b0be8c5d93930b (diff) |
pcmcia: re-work pcmcia_request_irq()
Instead of the old pcmcia_request_irq() interface, drivers may now
choose between:
- calling request_irq/free_irq directly. Use the IRQ from *p_dev->irq.
- use pcmcia_request_irq(p_dev, handler_t); the PCMCIA core will
clean up automatically on calls to pcmcia_disable_device() or
device ejection.
- drivers still not capable of IRQF_SHARED (or not telling us so) may
use the deprecated pcmcia_request_exclusive_irq() for the time
being; they might receive a shared IRQ nonetheless.
CC: linux-bluetooth@vger.kernel.org
CC: netdev@vger.kernel.org
CC: linux-wireless@vger.kernel.org
CC: linux-serial@vger.kernel.org
CC: alsa-devel@alsa-project.org
CC: linux-usb@vger.kernel.org
CC: linux-ide@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 | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c index a36501dbbe02..5e2efbb03675 100644 --- a/drivers/net/wireless/hostap/hostap_cs.c +++ b/drivers/net/wireless/hostap/hostap_cs.c | |||
@@ -556,15 +556,7 @@ static int prism2_config_check(struct pcmcia_device *p_dev, | |||
556 | p_dev->conf.Vpp = dflt->vpp1.param[CISTPL_POWER_VNOM] / 10000; | 556 | p_dev->conf.Vpp = dflt->vpp1.param[CISTPL_POWER_VNOM] / 10000; |
557 | 557 | ||
558 | /* Do we need to allocate an interrupt? */ | 558 | /* Do we need to allocate an interrupt? */ |
559 | if (cfg->irq.IRQInfo1 || dflt->irq.IRQInfo1) | 559 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; |
560 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; | ||
561 | else if (!(p_dev->conf.Attributes & CONF_ENABLE_IRQ)) { | ||
562 | /* At least Compaq WL200 does not have IRQInfo1 set, | ||
563 | * but it does not work without interrupts.. */ | ||
564 | printk(KERN_WARNING "Config has no IRQ info, but trying to " | ||
565 | "enable IRQ anyway..\n"); | ||
566 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; | ||
567 | } | ||
568 | 560 | ||
569 | /* IO window settings */ | 561 | /* IO window settings */ |
570 | PDEBUG(DEBUG_EXTRA, "IO window settings: cfg->io.nwin=%d " | 562 | PDEBUG(DEBUG_EXTRA, "IO window settings: cfg->io.nwin=%d " |
@@ -636,18 +628,9 @@ static int prism2_config(struct pcmcia_device *link) | |||
636 | strcpy(hw_priv->node.dev_name, dev->name); | 628 | strcpy(hw_priv->node.dev_name, dev->name); |
637 | link->dev_node = &hw_priv->node; | 629 | link->dev_node = &hw_priv->node; |
638 | 630 | ||
639 | /* | 631 | ret = pcmcia_request_irq(link, prism2_interrupt); |
640 | * Allocate an interrupt line. Note that this does not assign a | 632 | if (ret) |
641 | * handler to the interrupt, unless the 'Handler' member of the | 633 | goto failed; |
642 | * irq structure is initialized. | ||
643 | */ | ||
644 | if (link->conf.Attributes & CONF_ENABLE_IRQ) { | ||
645 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
646 | link->irq.Handler = prism2_interrupt; | ||
647 | ret = pcmcia_request_irq(link, &link->irq); | ||
648 | if (ret) | ||
649 | goto failed; | ||
650 | } | ||
651 | 634 | ||
652 | /* | 635 | /* |
653 | * This actually configures the PCMCIA socket -- setting up | 636 | * This actually configures the PCMCIA socket -- setting up |
@@ -658,7 +641,7 @@ static int prism2_config(struct pcmcia_device *link) | |||
658 | if (ret) | 641 | if (ret) |
659 | goto failed; | 642 | goto failed; |
660 | 643 | ||
661 | dev->irq = link->irq.AssignedIRQ; | 644 | dev->irq = link->irq; |
662 | dev->base_addr = link->io.BasePort1; | 645 | dev->base_addr = link->io.BasePort1; |
663 | 646 | ||
664 | /* Finally, report what we've done */ | 647 | /* Finally, report what we've done */ |
@@ -668,7 +651,7 @@ static int prism2_config(struct pcmcia_device *link) | |||
668 | printk(", Vpp %d.%d", link->conf.Vpp / 10, | 651 | printk(", Vpp %d.%d", link->conf.Vpp / 10, |
669 | link->conf.Vpp % 10); | 652 | link->conf.Vpp % 10); |
670 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 653 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
671 | printk(", irq %d", link->irq.AssignedIRQ); | 654 | printk(", irq %d", link->irq); |
672 | if (link->io.NumPorts1) | 655 | if (link->io.NumPorts1) |
673 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 656 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, |
674 | link->io.BasePort1+link->io.NumPorts1-1); | 657 | link->io.BasePort1+link->io.NumPorts1-1); |