mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] Signed-off-by: Dominik Brodowski <[email protected]>
This commit is contained in:
parent
a7debe789d
commit
eb14120f74
58 changed files with 244 additions and 593 deletions
|
|
@ -195,9 +195,6 @@ static int config_ipwireless(struct ipw_dev *ipw)
|
|||
link->conf.Attributes = CONF_ENABLE_IRQ;
|
||||
link->conf.IntType = INT_MEMORY_AND_IO;
|
||||
|
||||
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
|
||||
link->irq.Handler = ipwireless_interrupt;
|
||||
|
||||
INIT_WORK(&ipw->work_reboot, signalled_reboot_work);
|
||||
|
||||
ipwireless_init_hardware_v1(ipw->hardware, link->io.BasePort1,
|
||||
|
|
@ -205,8 +202,7 @@ static int config_ipwireless(struct ipw_dev *ipw)
|
|||
ipw->is_v2_card, signalled_reboot_callback,
|
||||
ipw);
|
||||
|
||||
ret = pcmcia_request_irq(link, &link->irq);
|
||||
|
||||
ret = pcmcia_request_irq(link, ipwireless_interrupt);
|
||||
if (ret != 0)
|
||||
goto exit;
|
||||
|
||||
|
|
@ -217,7 +213,7 @@ static int config_ipwireless(struct ipw_dev *ipw)
|
|||
(unsigned int) link->io.BasePort1,
|
||||
(unsigned int) (link->io.BasePort1 +
|
||||
link->io.NumPorts1 - 1),
|
||||
(unsigned int) link->irq.AssignedIRQ);
|
||||
(unsigned int) link->irq);
|
||||
if (ipw->attr_memory && ipw->common_memory)
|
||||
printk(KERN_INFO IPWIRELESS_PCCARD_NAME
|
||||
": attr memory 0x%08lx-0x%08lx, common memory 0x%08lx-0x%08lx\n",
|
||||
|
|
@ -271,8 +267,6 @@ exit:
|
|||
|
||||
static void release_ipwireless(struct ipw_dev *ipw)
|
||||
{
|
||||
pcmcia_disable_device(ipw->link);
|
||||
|
||||
if (ipw->common_memory) {
|
||||
release_mem_region(ipw->request_common_memory.Base,
|
||||
ipw->request_common_memory.Size);
|
||||
|
|
@ -288,7 +282,6 @@ static void release_ipwireless(struct ipw_dev *ipw)
|
|||
if (ipw->attr_memory)
|
||||
pcmcia_release_window(ipw->link, ipw->handle_attr_memory);
|
||||
|
||||
/* Break the link with Card Services */
|
||||
pcmcia_disable_device(ipw->link);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -552,10 +552,6 @@ static int mgslpc_probe(struct pcmcia_device *link)
|
|||
|
||||
/* Initialize the struct pcmcia_device structure */
|
||||
|
||||
/* Interrupt setup */
|
||||
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
|
||||
link->irq.Handler = NULL;
|
||||
|
||||
link->conf.Attributes = 0;
|
||||
link->conf.IntType = INT_MEMORY_AND_IO;
|
||||
|
||||
|
|
@ -608,9 +604,7 @@ static int mgslpc_config(struct pcmcia_device *link)
|
|||
link->conf.ConfigIndex = 8;
|
||||
link->conf.Present = PRESENT_OPTION;
|
||||
|
||||
link->irq.Handler = mgslpc_isr;
|
||||
|
||||
ret = pcmcia_request_irq(link, &link->irq);
|
||||
ret = pcmcia_request_irq(link, mgslpc_isr);
|
||||
if (ret)
|
||||
goto failed;
|
||||
ret = pcmcia_request_configuration(link, &link->conf);
|
||||
|
|
@ -618,7 +612,7 @@ static int mgslpc_config(struct pcmcia_device *link)
|
|||
goto failed;
|
||||
|
||||
info->io_base = link->io.BasePort1;
|
||||
info->irq_level = link->irq.AssignedIRQ;
|
||||
info->irq_level = link->irq;
|
||||
|
||||
/* add to linked list of devices */
|
||||
sprintf(info->node.dev_name, "mgslpc0");
|
||||
|
|
@ -628,7 +622,7 @@ static int mgslpc_config(struct pcmcia_device *link)
|
|||
printk(KERN_INFO "%s: index 0x%02x:",
|
||||
info->node.dev_name, link->conf.ConfigIndex);
|
||||
if (link->conf.Attributes & CONF_ENABLE_IRQ)
|
||||
printk(", irq %d", link->irq.AssignedIRQ);
|
||||
printk(", irq %d", link->irq);
|
||||
if (link->io.NumPorts1)
|
||||
printk(", io 0x%04x-0x%04x", link->io.BasePort1,
|
||||
link->io.BasePort1+link->io.NumPorts1-1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue