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 | |
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>
58 files changed, 244 insertions, 593 deletions
diff --git a/Documentation/pcmcia/driver-changes.txt b/Documentation/pcmcia/driver-changes.txt index 446f43b309df..3268a9ae7271 100644 --- a/Documentation/pcmcia/driver-changes.txt +++ b/Documentation/pcmcia/driver-changes.txt | |||
@@ -1,4 +1,14 @@ | |||
1 | This file details changes in 2.6 which affect PCMCIA card driver authors: | 1 | This file details changes in 2.6 which affect PCMCIA card driver authors: |
2 | * New IRQ request rules (as of 2.6.35) | ||
3 | Instead of the old pcmcia_request_irq() interface, drivers may now | ||
4 | choose between: | ||
5 | - calling request_irq/free_irq directly. Use the IRQ from *p_dev->irq. | ||
6 | - use pcmcia_request_irq(p_dev, handler_t); the PCMCIA core will | ||
7 | clean up automatically on calls to pcmcia_disable_device() or | ||
8 | device ejection. | ||
9 | - drivers still not capable of IRQF_SHARED (or not telling us so) may | ||
10 | use the deprecated pcmcia_request_exclusive_irq() for the time | ||
11 | being; they might receive a shared IRQ nonetheless. | ||
2 | 12 | ||
3 | * no cs_error / CS_CHECK / CONFIG_PCMCIA_DEBUG (as of 2.6.33) | 13 | * no cs_error / CS_CHECK / CONFIG_PCMCIA_DEBUG (as of 2.6.33) |
4 | Instead of the cs_error() callback or the CS_CHECK() macro, please use | 14 | Instead of the cs_error() callback or the CS_CHECK() macro, please use |
diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c index d94b8f0bd743..2aab1e0f6633 100644 --- a/drivers/ata/pata_pcmcia.c +++ b/drivers/ata/pata_pcmcia.c | |||
@@ -268,7 +268,6 @@ static int pcmcia_init_one(struct pcmcia_device *pdev) | |||
268 | pdev->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; | 268 | pdev->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; |
269 | pdev->io.Attributes2 = IO_DATA_PATH_WIDTH_8; | 269 | pdev->io.Attributes2 = IO_DATA_PATH_WIDTH_8; |
270 | pdev->io.IOAddrLines = 3; | 270 | pdev->io.IOAddrLines = 3; |
271 | pdev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
272 | pdev->conf.Attributes = CONF_ENABLE_IRQ; | 271 | pdev->conf.Attributes = CONF_ENABLE_IRQ; |
273 | pdev->conf.IntType = INT_MEMORY_AND_IO; | 272 | pdev->conf.IntType = INT_MEMORY_AND_IO; |
274 | 273 | ||
@@ -293,8 +292,7 @@ static int pcmcia_init_one(struct pcmcia_device *pdev) | |||
293 | } | 292 | } |
294 | io_base = pdev->io.BasePort1; | 293 | io_base = pdev->io.BasePort1; |
295 | ctl_base = stk->ctl_base; | 294 | ctl_base = stk->ctl_base; |
296 | ret = pcmcia_request_irq(pdev, &pdev->irq); | 295 | if (!pdev->irq) |
297 | if (ret) | ||
298 | goto failed; | 296 | goto failed; |
299 | 297 | ||
300 | ret = pcmcia_request_configuration(pdev, &pdev->conf); | 298 | ret = pcmcia_request_configuration(pdev, &pdev->conf); |
@@ -344,7 +342,7 @@ static int pcmcia_init_one(struct pcmcia_device *pdev) | |||
344 | } | 342 | } |
345 | 343 | ||
346 | /* activate */ | 344 | /* activate */ |
347 | ret = ata_host_activate(host, pdev->irq.AssignedIRQ, ata_sff_interrupt, | 345 | ret = ata_host_activate(host, pdev->irq, ata_sff_interrupt, |
348 | IRQF_SHARED, &pcmcia_sht); | 346 | IRQF_SHARED, &pcmcia_sht); |
349 | if (ret) | 347 | if (ret) |
350 | goto failed; | 348 | goto failed; |
diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c index d9bf87ca9e83..a34653db07bc 100644 --- a/drivers/bluetooth/bluecard_cs.c +++ b/drivers/bluetooth/bluecard_cs.c | |||
@@ -869,9 +869,6 @@ static int bluecard_probe(struct pcmcia_device *link) | |||
869 | 869 | ||
870 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 870 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; |
871 | link->io.NumPorts1 = 8; | 871 | link->io.NumPorts1 = 8; |
872 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
873 | |||
874 | link->irq.Handler = bluecard_interrupt; | ||
875 | 872 | ||
876 | link->conf.Attributes = CONF_ENABLE_IRQ; | 873 | link->conf.Attributes = CONF_ENABLE_IRQ; |
877 | link->conf.IntType = INT_MEMORY_AND_IO; | 874 | link->conf.IntType = INT_MEMORY_AND_IO; |
@@ -908,9 +905,9 @@ static int bluecard_config(struct pcmcia_device *link) | |||
908 | if (i != 0) | 905 | if (i != 0) |
909 | goto failed; | 906 | goto failed; |
910 | 907 | ||
911 | i = pcmcia_request_irq(link, &link->irq); | 908 | i = pcmcia_request_irq(link, bluecard_interrupt); |
912 | if (i != 0) | 909 | if (i != 0) |
913 | link->irq.AssignedIRQ = 0; | 910 | goto failed; |
914 | 911 | ||
915 | i = pcmcia_request_configuration(link, &link->conf); | 912 | i = pcmcia_request_configuration(link, &link->conf); |
916 | if (i != 0) | 913 | if (i != 0) |
diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c index 027cb8bf650f..1ad9694d4450 100644 --- a/drivers/bluetooth/bt3c_cs.c +++ b/drivers/bluetooth/bt3c_cs.c | |||
@@ -661,9 +661,6 @@ static int bt3c_probe(struct pcmcia_device *link) | |||
661 | 661 | ||
662 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 662 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; |
663 | link->io.NumPorts1 = 8; | 663 | link->io.NumPorts1 = 8; |
664 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
665 | |||
666 | link->irq.Handler = bt3c_interrupt; | ||
667 | 664 | ||
668 | link->conf.Attributes = CONF_ENABLE_IRQ; | 665 | link->conf.Attributes = CONF_ENABLE_IRQ; |
669 | link->conf.IntType = INT_MEMORY_AND_IO; | 666 | link->conf.IntType = INT_MEMORY_AND_IO; |
@@ -743,9 +740,9 @@ static int bt3c_config(struct pcmcia_device *link) | |||
743 | goto failed; | 740 | goto failed; |
744 | 741 | ||
745 | found_port: | 742 | found_port: |
746 | i = pcmcia_request_irq(link, &link->irq); | 743 | i = pcmcia_request_irq(link, &bt3c_interrupt); |
747 | if (i != 0) | 744 | if (i != 0) |
748 | link->irq.AssignedIRQ = 0; | 745 | goto failed; |
749 | 746 | ||
750 | i = pcmcia_request_configuration(link, &link->conf); | 747 | i = pcmcia_request_configuration(link, &link->conf); |
751 | if (i != 0) | 748 | if (i != 0) |
diff --git a/drivers/bluetooth/btuart_cs.c b/drivers/bluetooth/btuart_cs.c index 60c0953d7d00..1073d660d625 100644 --- a/drivers/bluetooth/btuart_cs.c +++ b/drivers/bluetooth/btuart_cs.c | |||
@@ -590,9 +590,6 @@ static int btuart_probe(struct pcmcia_device *link) | |||
590 | 590 | ||
591 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 591 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; |
592 | link->io.NumPorts1 = 8; | 592 | link->io.NumPorts1 = 8; |
593 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
594 | |||
595 | link->irq.Handler = btuart_interrupt; | ||
596 | 593 | ||
597 | link->conf.Attributes = CONF_ENABLE_IRQ; | 594 | link->conf.Attributes = CONF_ENABLE_IRQ; |
598 | link->conf.IntType = INT_MEMORY_AND_IO; | 595 | link->conf.IntType = INT_MEMORY_AND_IO; |
@@ -672,9 +669,9 @@ static int btuart_config(struct pcmcia_device *link) | |||
672 | goto failed; | 669 | goto failed; |
673 | 670 | ||
674 | found_port: | 671 | found_port: |
675 | i = pcmcia_request_irq(link, &link->irq); | 672 | i = pcmcia_request_irq(link, btuart_interrupt); |
676 | if (i != 0) | 673 | if (i != 0) |
677 | link->irq.AssignedIRQ = 0; | 674 | goto failed; |
678 | 675 | ||
679 | i = pcmcia_request_configuration(link, &link->conf); | 676 | i = pcmcia_request_configuration(link, &link->conf); |
680 | if (i != 0) | 677 | if (i != 0) |
diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c index 17788317c51a..3d72afddabb3 100644 --- a/drivers/bluetooth/dtl1_cs.c +++ b/drivers/bluetooth/dtl1_cs.c | |||
@@ -575,9 +575,6 @@ static int dtl1_probe(struct pcmcia_device *link) | |||
575 | 575 | ||
576 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 576 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; |
577 | link->io.NumPorts1 = 8; | 577 | link->io.NumPorts1 = 8; |
578 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
579 | |||
580 | link->irq.Handler = dtl1_interrupt; | ||
581 | 578 | ||
582 | link->conf.Attributes = CONF_ENABLE_IRQ; | 579 | link->conf.Attributes = CONF_ENABLE_IRQ; |
583 | link->conf.IntType = INT_MEMORY_AND_IO; | 580 | link->conf.IntType = INT_MEMORY_AND_IO; |
@@ -621,9 +618,9 @@ static int dtl1_config(struct pcmcia_device *link) | |||
621 | if (pcmcia_loop_config(link, dtl1_confcheck, NULL) < 0) | 618 | if (pcmcia_loop_config(link, dtl1_confcheck, NULL) < 0) |
622 | goto failed; | 619 | goto failed; |
623 | 620 | ||
624 | i = pcmcia_request_irq(link, &link->irq); | 621 | i = pcmcia_request_irq(link, dtl1_interrupt); |
625 | if (i != 0) | 622 | if (i != 0) |
626 | link->irq.AssignedIRQ = 0; | 623 | goto failed; |
627 | 624 | ||
628 | i = pcmcia_request_configuration(link, &link->conf); | 625 | i = pcmcia_request_configuration(link, &link->conf); |
629 | if (i != 0) | 626 | if (i != 0) |
diff --git a/drivers/char/pcmcia/ipwireless/main.c b/drivers/char/pcmcia/ipwireless/main.c index dff24dae1485..2237890bc256 100644 --- a/drivers/char/pcmcia/ipwireless/main.c +++ b/drivers/char/pcmcia/ipwireless/main.c | |||
@@ -195,9 +195,6 @@ static int config_ipwireless(struct ipw_dev *ipw) | |||
195 | link->conf.Attributes = CONF_ENABLE_IRQ; | 195 | link->conf.Attributes = CONF_ENABLE_IRQ; |
196 | link->conf.IntType = INT_MEMORY_AND_IO; | 196 | link->conf.IntType = INT_MEMORY_AND_IO; |
197 | 197 | ||
198 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
199 | link->irq.Handler = ipwireless_interrupt; | ||
200 | |||
201 | INIT_WORK(&ipw->work_reboot, signalled_reboot_work); | 198 | INIT_WORK(&ipw->work_reboot, signalled_reboot_work); |
202 | 199 | ||
203 | ipwireless_init_hardware_v1(ipw->hardware, link->io.BasePort1, | 200 | ipwireless_init_hardware_v1(ipw->hardware, link->io.BasePort1, |
@@ -205,8 +202,7 @@ static int config_ipwireless(struct ipw_dev *ipw) | |||
205 | ipw->is_v2_card, signalled_reboot_callback, | 202 | ipw->is_v2_card, signalled_reboot_callback, |
206 | ipw); | 203 | ipw); |
207 | 204 | ||
208 | ret = pcmcia_request_irq(link, &link->irq); | 205 | ret = pcmcia_request_irq(link, ipwireless_interrupt); |
209 | |||
210 | if (ret != 0) | 206 | if (ret != 0) |
211 | goto exit; | 207 | goto exit; |
212 | 208 | ||
@@ -217,7 +213,7 @@ static int config_ipwireless(struct ipw_dev *ipw) | |||
217 | (unsigned int) link->io.BasePort1, | 213 | (unsigned int) link->io.BasePort1, |
218 | (unsigned int) (link->io.BasePort1 + | 214 | (unsigned int) (link->io.BasePort1 + |
219 | link->io.NumPorts1 - 1), | 215 | link->io.NumPorts1 - 1), |
220 | (unsigned int) link->irq.AssignedIRQ); | 216 | (unsigned int) link->irq); |
221 | if (ipw->attr_memory && ipw->common_memory) | 217 | if (ipw->attr_memory && ipw->common_memory) |
222 | printk(KERN_INFO IPWIRELESS_PCCARD_NAME | 218 | printk(KERN_INFO IPWIRELESS_PCCARD_NAME |
223 | ": attr memory 0x%08lx-0x%08lx, common memory 0x%08lx-0x%08lx\n", | 219 | ": attr memory 0x%08lx-0x%08lx, common memory 0x%08lx-0x%08lx\n", |
@@ -271,8 +267,6 @@ exit: | |||
271 | 267 | ||
272 | static void release_ipwireless(struct ipw_dev *ipw) | 268 | static void release_ipwireless(struct ipw_dev *ipw) |
273 | { | 269 | { |
274 | pcmcia_disable_device(ipw->link); | ||
275 | |||
276 | if (ipw->common_memory) { | 270 | if (ipw->common_memory) { |
277 | release_mem_region(ipw->request_common_memory.Base, | 271 | release_mem_region(ipw->request_common_memory.Base, |
278 | ipw->request_common_memory.Size); | 272 | ipw->request_common_memory.Size); |
@@ -288,7 +282,6 @@ static void release_ipwireless(struct ipw_dev *ipw) | |||
288 | if (ipw->attr_memory) | 282 | if (ipw->attr_memory) |
289 | pcmcia_release_window(ipw->link, ipw->handle_attr_memory); | 283 | pcmcia_release_window(ipw->link, ipw->handle_attr_memory); |
290 | 284 | ||
291 | /* Break the link with Card Services */ | ||
292 | pcmcia_disable_device(ipw->link); | 285 | pcmcia_disable_device(ipw->link); |
293 | } | 286 | } |
294 | 287 | ||
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index c31a0d913d37..027690b70d2c 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c | |||
@@ -552,10 +552,6 @@ static int mgslpc_probe(struct pcmcia_device *link) | |||
552 | 552 | ||
553 | /* Initialize the struct pcmcia_device structure */ | 553 | /* Initialize the struct pcmcia_device structure */ |
554 | 554 | ||
555 | /* Interrupt setup */ | ||
556 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
557 | link->irq.Handler = NULL; | ||
558 | |||
559 | link->conf.Attributes = 0; | 555 | link->conf.Attributes = 0; |
560 | link->conf.IntType = INT_MEMORY_AND_IO; | 556 | link->conf.IntType = INT_MEMORY_AND_IO; |
561 | 557 | ||
@@ -608,9 +604,7 @@ static int mgslpc_config(struct pcmcia_device *link) | |||
608 | link->conf.ConfigIndex = 8; | 604 | link->conf.ConfigIndex = 8; |
609 | link->conf.Present = PRESENT_OPTION; | 605 | link->conf.Present = PRESENT_OPTION; |
610 | 606 | ||
611 | link->irq.Handler = mgslpc_isr; | 607 | ret = pcmcia_request_irq(link, mgslpc_isr); |
612 | |||
613 | ret = pcmcia_request_irq(link, &link->irq); | ||
614 | if (ret) | 608 | if (ret) |
615 | goto failed; | 609 | goto failed; |
616 | ret = pcmcia_request_configuration(link, &link->conf); | 610 | ret = pcmcia_request_configuration(link, &link->conf); |
@@ -618,7 +612,7 @@ static int mgslpc_config(struct pcmcia_device *link) | |||
618 | goto failed; | 612 | goto failed; |
619 | 613 | ||
620 | info->io_base = link->io.BasePort1; | 614 | info->io_base = link->io.BasePort1; |
621 | info->irq_level = link->irq.AssignedIRQ; | 615 | info->irq_level = link->irq; |
622 | 616 | ||
623 | /* add to linked list of devices */ | 617 | /* add to linked list of devices */ |
624 | sprintf(info->node.dev_name, "mgslpc0"); | 618 | sprintf(info->node.dev_name, "mgslpc0"); |
@@ -628,7 +622,7 @@ static int mgslpc_config(struct pcmcia_device *link) | |||
628 | printk(KERN_INFO "%s: index 0x%02x:", | 622 | printk(KERN_INFO "%s: index 0x%02x:", |
629 | info->node.dev_name, link->conf.ConfigIndex); | 623 | info->node.dev_name, link->conf.ConfigIndex); |
630 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 624 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
631 | printk(", irq %d", link->irq.AssignedIRQ); | 625 | printk(", irq %d", link->irq); |
632 | if (link->io.NumPorts1) | 626 | if (link->io.NumPorts1) |
633 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 627 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, |
634 | link->io.BasePort1+link->io.NumPorts1-1); | 628 | link->io.BasePort1+link->io.NumPorts1-1); |
diff --git a/drivers/ide/ide-cs.c b/drivers/ide/ide-cs.c index b85450865ff0..17ad91e453e4 100644 --- a/drivers/ide/ide-cs.c +++ b/drivers/ide/ide-cs.c | |||
@@ -102,7 +102,6 @@ static int ide_probe(struct pcmcia_device *link) | |||
102 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; | 102 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; |
103 | link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; | 103 | link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; |
104 | link->io.IOAddrLines = 3; | 104 | link->io.IOAddrLines = 3; |
105 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
106 | link->conf.Attributes = CONF_ENABLE_IRQ; | 105 | link->conf.Attributes = CONF_ENABLE_IRQ; |
107 | link->conf.IntType = INT_MEMORY_AND_IO; | 106 | link->conf.IntType = INT_MEMORY_AND_IO; |
108 | 107 | ||
@@ -285,8 +284,7 @@ static int ide_config(struct pcmcia_device *link) | |||
285 | io_base = link->io.BasePort1; | 284 | io_base = link->io.BasePort1; |
286 | ctl_base = stk->ctl_base; | 285 | ctl_base = stk->ctl_base; |
287 | 286 | ||
288 | ret = pcmcia_request_irq(link, &link->irq); | 287 | if (!link->irq) |
289 | if (ret) | ||
290 | goto failed; | 288 | goto failed; |
291 | ret = pcmcia_request_configuration(link, &link->conf); | 289 | ret = pcmcia_request_configuration(link, &link->conf); |
292 | if (ret) | 290 | if (ret) |
@@ -299,11 +297,11 @@ static int ide_config(struct pcmcia_device *link) | |||
299 | if (is_kme) | 297 | if (is_kme) |
300 | outb(0x81, ctl_base+1); | 298 | outb(0x81, ctl_base+1); |
301 | 299 | ||
302 | host = idecs_register(io_base, ctl_base, link->irq.AssignedIRQ, link); | 300 | host = idecs_register(io_base, ctl_base, link->irq, link); |
303 | if (host == NULL && link->io.NumPorts1 == 0x20) { | 301 | if (host == NULL && link->io.NumPorts1 == 0x20) { |
304 | outb(0x02, ctl_base + 0x10); | 302 | outb(0x02, ctl_base + 0x10); |
305 | host = idecs_register(io_base + 0x10, ctl_base + 0x10, | 303 | host = idecs_register(io_base + 0x10, ctl_base + 0x10, |
306 | link->irq.AssignedIRQ, link); | 304 | link->irq, link); |
307 | } | 305 | } |
308 | 306 | ||
309 | if (host == NULL) | 307 | if (host == NULL) |
diff --git a/drivers/isdn/hardware/avm/avm_cs.c b/drivers/isdn/hardware/avm/avm_cs.c index 94b796d84053..0d485f6c2194 100644 --- a/drivers/isdn/hardware/avm/avm_cs.c +++ b/drivers/isdn/hardware/avm/avm_cs.c | |||
@@ -107,9 +107,6 @@ static int avmcs_probe(struct pcmcia_device *p_dev) | |||
107 | p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 107 | p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8; |
108 | p_dev->io.NumPorts2 = 0; | 108 | p_dev->io.NumPorts2 = 0; |
109 | 109 | ||
110 | /* Interrupt setup */ | ||
111 | p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
112 | |||
113 | /* General socket configuration */ | 110 | /* General socket configuration */ |
114 | p_dev->conf.Attributes = CONF_ENABLE_IRQ; | 111 | p_dev->conf.Attributes = CONF_ENABLE_IRQ; |
115 | p_dev->conf.IntType = INT_MEMORY_AND_IO; | 112 | p_dev->conf.IntType = INT_MEMORY_AND_IO; |
@@ -172,7 +169,7 @@ static int avmcs_configcheck(struct pcmcia_device *p_dev, | |||
172 | static int avmcs_config(struct pcmcia_device *link) | 169 | static int avmcs_config(struct pcmcia_device *link) |
173 | { | 170 | { |
174 | local_info_t *dev; | 171 | local_info_t *dev; |
175 | int i; | 172 | int i = -1; |
176 | char devname[128]; | 173 | char devname[128]; |
177 | int cardtype; | 174 | int cardtype; |
178 | int (*addcard)(unsigned int port, unsigned irq); | 175 | int (*addcard)(unsigned int port, unsigned irq); |
@@ -190,11 +187,7 @@ static int avmcs_config(struct pcmcia_device *link) | |||
190 | return -ENODEV; | 187 | return -ENODEV; |
191 | 188 | ||
192 | do { | 189 | do { |
193 | /* | 190 | if (!link->irq) { |
194 | * allocate an interrupt line | ||
195 | */ | ||
196 | i = pcmcia_request_irq(link, &link->irq); | ||
197 | if (i != 0) { | ||
198 | /* undo */ | 191 | /* undo */ |
199 | pcmcia_disable_device(link); | 192 | pcmcia_disable_device(link); |
200 | break; | 193 | break; |
@@ -249,9 +242,9 @@ static int avmcs_config(struct pcmcia_device *link) | |||
249 | default: | 242 | default: |
250 | case AVM_CARDTYPE_B1: addcard = b1pcmcia_addcard_b1; break; | 243 | case AVM_CARDTYPE_B1: addcard = b1pcmcia_addcard_b1; break; |
251 | } | 244 | } |
252 | if ((i = (*addcard)(link->io.BasePort1, link->irq.AssignedIRQ)) < 0) { | 245 | if ((i = (*addcard)(link->io.BasePort1, link->irq)) < 0) { |
253 | printk(KERN_ERR "avm_cs: failed to add AVM-%s-Controller at i/o %#x, irq %d\n", | 246 | printk(KERN_ERR "avm_cs: failed to add AVM-%s-Controller at i/o %#x, irq %d\n", |
254 | dev->node.dev_name, link->io.BasePort1, link->irq.AssignedIRQ); | 247 | dev->node.dev_name, link->io.BasePort1, link->irq); |
255 | avmcs_release(link); | 248 | avmcs_release(link); |
256 | return -ENODEV; | 249 | return -ENODEV; |
257 | } | 250 | } |
@@ -270,7 +263,7 @@ static int avmcs_config(struct pcmcia_device *link) | |||
270 | 263 | ||
271 | static void avmcs_release(struct pcmcia_device *link) | 264 | static void avmcs_release(struct pcmcia_device *link) |
272 | { | 265 | { |
273 | b1pcmcia_delcard(link->io.BasePort1, link->irq.AssignedIRQ); | 266 | b1pcmcia_delcard(link->io.BasePort1, link->irq); |
274 | pcmcia_disable_device(link); | 267 | pcmcia_disable_device(link); |
275 | } /* avmcs_release */ | 268 | } /* avmcs_release */ |
276 | 269 | ||
diff --git a/drivers/isdn/hisax/avma1_cs.c b/drivers/isdn/hisax/avma1_cs.c index 8d1d63a02b34..3ae2176c6f75 100644 --- a/drivers/isdn/hisax/avma1_cs.c +++ b/drivers/isdn/hisax/avma1_cs.c | |||
@@ -119,9 +119,6 @@ static int __devinit avma1cs_probe(struct pcmcia_device *p_dev) | |||
119 | p_dev->io.Attributes2 = IO_DATA_PATH_WIDTH_16; | 119 | p_dev->io.Attributes2 = IO_DATA_PATH_WIDTH_16; |
120 | p_dev->io.IOAddrLines = 5; | 120 | p_dev->io.IOAddrLines = 5; |
121 | 121 | ||
122 | /* Interrupt setup */ | ||
123 | p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
124 | |||
125 | /* General socket configuration */ | 122 | /* General socket configuration */ |
126 | p_dev->conf.Attributes = CONF_ENABLE_IRQ; | 123 | p_dev->conf.Attributes = CONF_ENABLE_IRQ; |
127 | p_dev->conf.IntType = INT_MEMORY_AND_IO; | 124 | p_dev->conf.IntType = INT_MEMORY_AND_IO; |
@@ -177,7 +174,7 @@ static int avma1cs_configcheck(struct pcmcia_device *p_dev, | |||
177 | static int __devinit avma1cs_config(struct pcmcia_device *link) | 174 | static int __devinit avma1cs_config(struct pcmcia_device *link) |
178 | { | 175 | { |
179 | local_info_t *dev; | 176 | local_info_t *dev; |
180 | int i; | 177 | int i = -1; |
181 | char devname[128]; | 178 | char devname[128]; |
182 | IsdnCard_t icard; | 179 | IsdnCard_t icard; |
183 | int busy = 0; | 180 | int busy = 0; |
@@ -197,8 +194,7 @@ static int __devinit avma1cs_config(struct pcmcia_device *link) | |||
197 | /* | 194 | /* |
198 | * allocate an interrupt line | 195 | * allocate an interrupt line |
199 | */ | 196 | */ |
200 | i = pcmcia_request_irq(link, &link->irq); | 197 | if (!link->irq) { |
201 | if (i != 0) { | ||
202 | /* undo */ | 198 | /* undo */ |
203 | pcmcia_disable_device(link); | 199 | pcmcia_disable_device(link); |
204 | break; | 200 | break; |
@@ -230,9 +226,9 @@ static int __devinit avma1cs_config(struct pcmcia_device *link) | |||
230 | } | 226 | } |
231 | 227 | ||
232 | printk(KERN_NOTICE "avma1_cs: checking at i/o %#x, irq %d\n", | 228 | printk(KERN_NOTICE "avma1_cs: checking at i/o %#x, irq %d\n", |
233 | link->io.BasePort1, link->irq.AssignedIRQ); | 229 | link->io.BasePort1, link->irq); |
234 | 230 | ||
235 | icard.para[0] = link->irq.AssignedIRQ; | 231 | icard.para[0] = link->irq; |
236 | icard.para[1] = link->io.BasePort1; | 232 | icard.para[1] = link->io.BasePort1; |
237 | icard.protocol = isdnprot; | 233 | icard.protocol = isdnprot; |
238 | icard.typ = ISDN_CTYPE_A1_PCMCIA; | 234 | icard.typ = ISDN_CTYPE_A1_PCMCIA; |
diff --git a/drivers/isdn/hisax/elsa_cs.c b/drivers/isdn/hisax/elsa_cs.c index c9f2279e21f5..8e170e4b7cf2 100644 --- a/drivers/isdn/hisax/elsa_cs.c +++ b/drivers/isdn/hisax/elsa_cs.c | |||
@@ -136,10 +136,6 @@ static int __devinit elsa_cs_probe(struct pcmcia_device *link) | |||
136 | 136 | ||
137 | local->cardnr = -1; | 137 | local->cardnr = -1; |
138 | 138 | ||
139 | /* Interrupt setup */ | ||
140 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
141 | link->irq.Handler = NULL; | ||
142 | |||
143 | /* | 139 | /* |
144 | General socket configuration defaults can go here. In this | 140 | General socket configuration defaults can go here. In this |
145 | client, we assume very little, and rely on the CIS for almost | 141 | client, we assume very little, and rely on the CIS for almost |
@@ -223,11 +219,8 @@ static int __devinit elsa_cs_config(struct pcmcia_device *link) | |||
223 | if (i != 0) | 219 | if (i != 0) |
224 | goto failed; | 220 | goto failed; |
225 | 221 | ||
226 | i = pcmcia_request_irq(link, &link->irq); | 222 | if (!link->irq) |
227 | if (i != 0) { | ||
228 | link->irq.AssignedIRQ = 0; | ||
229 | goto failed; | 223 | goto failed; |
230 | } | ||
231 | 224 | ||
232 | i = pcmcia_request_configuration(link, &link->conf); | 225 | i = pcmcia_request_configuration(link, &link->conf); |
233 | if (i != 0) | 226 | if (i != 0) |
@@ -244,7 +237,7 @@ static int __devinit elsa_cs_config(struct pcmcia_device *link) | |||
244 | printk(KERN_INFO "%s: index 0x%02x: ", | 237 | printk(KERN_INFO "%s: index 0x%02x: ", |
245 | dev->node.dev_name, link->conf.ConfigIndex); | 238 | dev->node.dev_name, link->conf.ConfigIndex); |
246 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 239 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
247 | printk(", irq %d", link->irq.AssignedIRQ); | 240 | printk(", irq %d", link->irq); |
248 | if (link->io.NumPorts1) | 241 | if (link->io.NumPorts1) |
249 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 242 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, |
250 | link->io.BasePort1+link->io.NumPorts1-1); | 243 | link->io.BasePort1+link->io.NumPorts1-1); |
@@ -253,7 +246,7 @@ static int __devinit elsa_cs_config(struct pcmcia_device *link) | |||
253 | link->io.BasePort2+link->io.NumPorts2-1); | 246 | link->io.BasePort2+link->io.NumPorts2-1); |
254 | printk("\n"); | 247 | printk("\n"); |
255 | 248 | ||
256 | icard.para[0] = link->irq.AssignedIRQ; | 249 | icard.para[0] = link->irq; |
257 | icard.para[1] = link->io.BasePort1; | 250 | icard.para[1] = link->io.BasePort1; |
258 | icard.protocol = protocol; | 251 | icard.protocol = protocol; |
259 | icard.typ = ISDN_CTYPE_ELSA_PCMCIA; | 252 | icard.typ = ISDN_CTYPE_ELSA_PCMCIA; |
diff --git a/drivers/isdn/hisax/sedlbauer_cs.c b/drivers/isdn/hisax/sedlbauer_cs.c index 71b3ddef03bb..7778385b05b2 100644 --- a/drivers/isdn/hisax/sedlbauer_cs.c +++ b/drivers/isdn/hisax/sedlbauer_cs.c | |||
@@ -143,10 +143,6 @@ static int __devinit sedlbauer_probe(struct pcmcia_device *link) | |||
143 | local->p_dev = link; | 143 | local->p_dev = link; |
144 | link->priv = local; | 144 | link->priv = local; |
145 | 145 | ||
146 | /* Interrupt setup */ | ||
147 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
148 | link->irq.Handler = NULL; | ||
149 | |||
150 | /* | 146 | /* |
151 | General socket configuration defaults can go here. In this | 147 | General socket configuration defaults can go here. In this |
152 | client, we assume very little, and rely on the CIS for almost | 148 | client, we assume very little, and rely on the CIS for almost |
@@ -227,9 +223,7 @@ static int sedlbauer_config_check(struct pcmcia_device *p_dev, | |||
227 | else if (dflt->vpp1.present & (1<<CISTPL_POWER_VNOM)) | 223 | else if (dflt->vpp1.present & (1<<CISTPL_POWER_VNOM)) |
228 | p_dev->conf.Vpp = dflt->vpp1.param[CISTPL_POWER_VNOM]/10000; | 224 | p_dev->conf.Vpp = dflt->vpp1.param[CISTPL_POWER_VNOM]/10000; |
229 | 225 | ||
230 | /* Do we need to allocate an interrupt? */ | 226 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; |
231 | if (cfg->irq.IRQInfo1 || dflt->irq.IRQInfo1) | ||
232 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; | ||
233 | 227 | ||
234 | /* IO window settings */ | 228 | /* IO window settings */ |
235 | p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; | 229 | p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; |
@@ -313,17 +307,6 @@ static int __devinit sedlbauer_config(struct pcmcia_device *link) | |||
313 | goto failed; | 307 | goto failed; |
314 | 308 | ||
315 | /* | 309 | /* |
316 | Allocate an interrupt line. Note that this does not assign a | ||
317 | handler to the interrupt, unless the 'Handler' member of the | ||
318 | irq structure is initialized. | ||
319 | */ | ||
320 | if (link->conf.Attributes & CONF_ENABLE_IRQ) { | ||
321 | ret = pcmcia_request_irq(link, &link->irq); | ||
322 | if (ret) | ||
323 | goto failed; | ||
324 | } | ||
325 | |||
326 | /* | ||
327 | This actually configures the PCMCIA socket -- setting up | 310 | This actually configures the PCMCIA socket -- setting up |
328 | the I/O windows and the interrupt mapping, and putting the | 311 | the I/O windows and the interrupt mapping, and putting the |
329 | card and host interface into "Memory and IO" mode. | 312 | card and host interface into "Memory and IO" mode. |
@@ -346,7 +329,7 @@ static int __devinit sedlbauer_config(struct pcmcia_device *link) | |||
346 | if (link->conf.Vpp) | 329 | if (link->conf.Vpp) |
347 | printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10); | 330 | printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10); |
348 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 331 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
349 | printk(", irq %d", link->irq.AssignedIRQ); | 332 | printk(", irq %d", link->irq); |
350 | if (link->io.NumPorts1) | 333 | if (link->io.NumPorts1) |
351 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 334 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, |
352 | link->io.BasePort1+link->io.NumPorts1-1); | 335 | link->io.BasePort1+link->io.NumPorts1-1); |
@@ -358,7 +341,7 @@ static int __devinit sedlbauer_config(struct pcmcia_device *link) | |||
358 | req->Base+req->Size-1); | 341 | req->Base+req->Size-1); |
359 | printk("\n"); | 342 | printk("\n"); |
360 | 343 | ||
361 | icard.para[0] = link->irq.AssignedIRQ; | 344 | icard.para[0] = link->irq; |
362 | icard.para[1] = link->io.BasePort1; | 345 | icard.para[1] = link->io.BasePort1; |
363 | icard.protocol = protocol; | 346 | icard.protocol = protocol; |
364 | icard.typ = ISDN_CTYPE_SEDLBAUER_PCMCIA; | 347 | icard.typ = ISDN_CTYPE_SEDLBAUER_PCMCIA; |
diff --git a/drivers/isdn/hisax/teles_cs.c b/drivers/isdn/hisax/teles_cs.c index d010a0da8e19..02dec13f25e5 100644 --- a/drivers/isdn/hisax/teles_cs.c +++ b/drivers/isdn/hisax/teles_cs.c | |||
@@ -126,10 +126,6 @@ static int __devinit teles_probe(struct pcmcia_device *link) | |||
126 | local->p_dev = link; | 126 | local->p_dev = link; |
127 | link->priv = local; | 127 | link->priv = local; |
128 | 128 | ||
129 | /* Interrupt setup */ | ||
130 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
131 | link->irq.Handler = NULL; | ||
132 | |||
133 | /* | 129 | /* |
134 | General socket configuration defaults can go here. In this | 130 | General socket configuration defaults can go here. In this |
135 | client, we assume very little, and rely on the CIS for almost | 131 | client, we assume very little, and rely on the CIS for almost |
@@ -213,11 +209,8 @@ static int __devinit teles_cs_config(struct pcmcia_device *link) | |||
213 | if (i != 0) | 209 | if (i != 0) |
214 | goto cs_failed; | 210 | goto cs_failed; |
215 | 211 | ||
216 | i = pcmcia_request_irq(link, &link->irq); | 212 | if (!link->irq) |
217 | if (i != 0) { | ||
218 | link->irq.AssignedIRQ = 0; | ||
219 | goto cs_failed; | 213 | goto cs_failed; |
220 | } | ||
221 | 214 | ||
222 | i = pcmcia_request_configuration(link, &link->conf); | 215 | i = pcmcia_request_configuration(link, &link->conf); |
223 | if (i != 0) | 216 | if (i != 0) |
@@ -234,7 +227,7 @@ static int __devinit teles_cs_config(struct pcmcia_device *link) | |||
234 | printk(KERN_INFO "%s: index 0x%02x:", | 227 | printk(KERN_INFO "%s: index 0x%02x:", |
235 | dev->node.dev_name, link->conf.ConfigIndex); | 228 | dev->node.dev_name, link->conf.ConfigIndex); |
236 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 229 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
237 | printk(", irq %d", link->irq.AssignedIRQ); | 230 | printk(", irq %d", link->irq); |
238 | if (link->io.NumPorts1) | 231 | if (link->io.NumPorts1) |
239 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 232 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, |
240 | link->io.BasePort1+link->io.NumPorts1-1); | 233 | link->io.BasePort1+link->io.NumPorts1-1); |
@@ -243,7 +236,7 @@ static int __devinit teles_cs_config(struct pcmcia_device *link) | |||
243 | link->io.BasePort2+link->io.NumPorts2-1); | 236 | link->io.BasePort2+link->io.NumPorts2-1); |
244 | printk("\n"); | 237 | printk("\n"); |
245 | 238 | ||
246 | icard.para[0] = link->irq.AssignedIRQ; | 239 | icard.para[0] = link->irq; |
247 | icard.para[1] = link->io.BasePort1; | 240 | icard.para[1] = link->io.BasePort1; |
248 | icard.protocol = protocol; | 241 | icard.protocol = protocol; |
249 | icard.typ = ISDN_CTYPE_TELESPCMCIA; | 242 | icard.typ = ISDN_CTYPE_TELESPCMCIA; |
diff --git a/drivers/net/pcmcia/3c574_cs.c b/drivers/net/pcmcia/3c574_cs.c index 757f87bb1db3..14428317c009 100644 --- a/drivers/net/pcmcia/3c574_cs.c +++ b/drivers/net/pcmcia/3c574_cs.c | |||
@@ -283,8 +283,6 @@ static int tc574_probe(struct pcmcia_device *link) | |||
283 | spin_lock_init(&lp->window_lock); | 283 | spin_lock_init(&lp->window_lock); |
284 | link->io.NumPorts1 = 32; | 284 | link->io.NumPorts1 = 32; |
285 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_16; | 285 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_16; |
286 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
287 | link->irq.Handler = &el3_interrupt; | ||
288 | link->conf.Attributes = CONF_ENABLE_IRQ; | 286 | link->conf.Attributes = CONF_ENABLE_IRQ; |
289 | link->conf.IntType = INT_MEMORY_AND_IO; | 287 | link->conf.IntType = INT_MEMORY_AND_IO; |
290 | link->conf.ConfigIndex = 1; | 288 | link->conf.ConfigIndex = 1; |
@@ -353,7 +351,7 @@ static int tc574_config(struct pcmcia_device *link) | |||
353 | if (i != 0) | 351 | if (i != 0) |
354 | goto failed; | 352 | goto failed; |
355 | 353 | ||
356 | ret = pcmcia_request_irq(link, &link->irq); | 354 | ret = pcmcia_request_irq(link, el3_interrupt); |
357 | if (ret) | 355 | if (ret) |
358 | goto failed; | 356 | goto failed; |
359 | 357 | ||
@@ -361,7 +359,7 @@ static int tc574_config(struct pcmcia_device *link) | |||
361 | if (ret) | 359 | if (ret) |
362 | goto failed; | 360 | goto failed; |
363 | 361 | ||
364 | dev->irq = link->irq.AssignedIRQ; | 362 | dev->irq = link->irq; |
365 | dev->base_addr = link->io.BasePort1; | 363 | dev->base_addr = link->io.BasePort1; |
366 | 364 | ||
367 | ioaddr = dev->base_addr; | 365 | ioaddr = dev->base_addr; |
diff --git a/drivers/net/pcmcia/3c589_cs.c b/drivers/net/pcmcia/3c589_cs.c index 091e0b00043e..405d772bfde7 100644 --- a/drivers/net/pcmcia/3c589_cs.c +++ b/drivers/net/pcmcia/3c589_cs.c | |||
@@ -194,8 +194,7 @@ static int tc589_probe(struct pcmcia_device *link) | |||
194 | spin_lock_init(&lp->lock); | 194 | spin_lock_init(&lp->lock); |
195 | link->io.NumPorts1 = 16; | 195 | link->io.NumPorts1 = 16; |
196 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_16; | 196 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_16; |
197 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | 197 | |
198 | link->irq.Handler = &el3_interrupt; | ||
199 | link->conf.Attributes = CONF_ENABLE_IRQ; | 198 | link->conf.Attributes = CONF_ENABLE_IRQ; |
200 | link->conf.IntType = INT_MEMORY_AND_IO; | 199 | link->conf.IntType = INT_MEMORY_AND_IO; |
201 | link->conf.ConfigIndex = 1; | 200 | link->conf.ConfigIndex = 1; |
@@ -271,7 +270,7 @@ static int tc589_config(struct pcmcia_device *link) | |||
271 | if (i != 0) | 270 | if (i != 0) |
272 | goto failed; | 271 | goto failed; |
273 | 272 | ||
274 | ret = pcmcia_request_irq(link, &link->irq); | 273 | ret = pcmcia_request_irq(link, el3_interrupt); |
275 | if (ret) | 274 | if (ret) |
276 | goto failed; | 275 | goto failed; |
277 | 276 | ||
@@ -279,7 +278,7 @@ static int tc589_config(struct pcmcia_device *link) | |||
279 | if (ret) | 278 | if (ret) |
280 | goto failed; | 279 | goto failed; |
281 | 280 | ||
282 | dev->irq = link->irq.AssignedIRQ; | 281 | dev->irq = link->irq; |
283 | dev->base_addr = link->io.BasePort1; | 282 | dev->base_addr = link->io.BasePort1; |
284 | ioaddr = dev->base_addr; | 283 | ioaddr = dev->base_addr; |
285 | EL3WINDOW(0); | 284 | EL3WINDOW(0); |
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c index 9f3d593f14ed..967547a84b4b 100644 --- a/drivers/net/pcmcia/axnet_cs.c +++ b/drivers/net/pcmcia/axnet_cs.c | |||
@@ -168,7 +168,6 @@ static int axnet_probe(struct pcmcia_device *link) | |||
168 | info = PRIV(dev); | 168 | info = PRIV(dev); |
169 | info->p_dev = link; | 169 | info->p_dev = link; |
170 | link->priv = dev; | 170 | link->priv = dev; |
171 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
172 | link->conf.Attributes = CONF_ENABLE_IRQ; | 171 | link->conf.Attributes = CONF_ENABLE_IRQ; |
173 | link->conf.IntType = INT_MEMORY_AND_IO; | 172 | link->conf.IntType = INT_MEMORY_AND_IO; |
174 | 173 | ||
@@ -265,12 +264,9 @@ static int try_io_port(struct pcmcia_device *link) | |||
265 | int j, ret; | 264 | int j, ret; |
266 | if (link->io.NumPorts1 == 32) { | 265 | if (link->io.NumPorts1 == 32) { |
267 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; | 266 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; |
268 | if (link->io.NumPorts2 > 0) { | 267 | /* for master/slave multifunction cards */ |
269 | /* for master/slave multifunction cards */ | 268 | if (link->io.NumPorts2 > 0) |
270 | link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; | 269 | link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; |
271 | link->irq.Attributes = | ||
272 | IRQ_TYPE_DYNAMIC_SHARING; | ||
273 | } | ||
274 | } else { | 270 | } else { |
275 | /* This should be two 16-port windows */ | 271 | /* This should be two 16-port windows */ |
276 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 272 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; |
@@ -336,8 +332,7 @@ static int axnet_config(struct pcmcia_device *link) | |||
336 | if (ret != 0) | 332 | if (ret != 0) |
337 | goto failed; | 333 | goto failed; |
338 | 334 | ||
339 | ret = pcmcia_request_irq(link, &link->irq); | 335 | if (!link->irq) |
340 | if (ret) | ||
341 | goto failed; | 336 | goto failed; |
342 | 337 | ||
343 | if (link->io.NumPorts2 == 8) { | 338 | if (link->io.NumPorts2 == 8) { |
@@ -349,7 +344,7 @@ static int axnet_config(struct pcmcia_device *link) | |||
349 | if (ret) | 344 | if (ret) |
350 | goto failed; | 345 | goto failed; |
351 | 346 | ||
352 | dev->irq = link->irq.AssignedIRQ; | 347 | dev->irq = link->irq; |
353 | dev->base_addr = link->io.BasePort1; | 348 | dev->base_addr = link->io.BasePort1; |
354 | 349 | ||
355 | if (!get_prom(link)) { | 350 | if (!get_prom(link)) { |
diff --git a/drivers/net/pcmcia/com20020_cs.c b/drivers/net/pcmcia/com20020_cs.c index 21d9c9d815d1..278438beb915 100644 --- a/drivers/net/pcmcia/com20020_cs.c +++ b/drivers/net/pcmcia/com20020_cs.c | |||
@@ -163,7 +163,6 @@ static int com20020_probe(struct pcmcia_device *p_dev) | |||
163 | p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 163 | p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8; |
164 | p_dev->io.NumPorts1 = 16; | 164 | p_dev->io.NumPorts1 = 16; |
165 | p_dev->io.IOAddrLines = 16; | 165 | p_dev->io.IOAddrLines = 16; |
166 | p_dev->irq.Attributes = IRQ_TYPE_EXCLUSIVE; | ||
167 | p_dev->conf.Attributes = CONF_ENABLE_IRQ; | 166 | p_dev->conf.Attributes = CONF_ENABLE_IRQ; |
168 | p_dev->conf.IntType = INT_MEMORY_AND_IO; | 167 | p_dev->conf.IntType = INT_MEMORY_AND_IO; |
169 | 168 | ||
@@ -275,15 +274,14 @@ static int com20020_config(struct pcmcia_device *link) | |||
275 | dev_dbg(&link->dev, "got ioaddr %Xh\n", ioaddr); | 274 | dev_dbg(&link->dev, "got ioaddr %Xh\n", ioaddr); |
276 | 275 | ||
277 | dev_dbg(&link->dev, "request IRQ %d\n", | 276 | dev_dbg(&link->dev, "request IRQ %d\n", |
278 | link->irq.AssignedIRQ); | 277 | link->irq); |
279 | i = pcmcia_request_irq(link, &link->irq); | 278 | if (!link->irq) |
280 | if (i != 0) | ||
281 | { | 279 | { |
282 | dev_dbg(&link->dev, "requestIRQ failed totally!\n"); | 280 | dev_dbg(&link->dev, "requestIRQ failed totally!\n"); |
283 | goto failed; | 281 | goto failed; |
284 | } | 282 | } |
285 | 283 | ||
286 | dev->irq = link->irq.AssignedIRQ; | 284 | dev->irq = link->irq; |
287 | 285 | ||
288 | ret = pcmcia_request_configuration(link, &link->conf); | 286 | ret = pcmcia_request_configuration(link, &link->conf); |
289 | if (ret) | 287 | if (ret) |
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c index b9dc80b9d04a..31f1a037737c 100644 --- a/drivers/net/pcmcia/fmvj18x_cs.c +++ b/drivers/net/pcmcia/fmvj18x_cs.c | |||
@@ -254,10 +254,6 @@ static int fmvj18x_probe(struct pcmcia_device *link) | |||
254 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; | 254 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; |
255 | link->io.IOAddrLines = 5; | 255 | link->io.IOAddrLines = 5; |
256 | 256 | ||
257 | /* Interrupt setup */ | ||
258 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
259 | link->irq.Handler = fjn_interrupt; | ||
260 | |||
261 | /* General socket configuration */ | 257 | /* General socket configuration */ |
262 | link->conf.Attributes = CONF_ENABLE_IRQ; | 258 | link->conf.Attributes = CONF_ENABLE_IRQ; |
263 | link->conf.IntType = INT_MEMORY_AND_IO; | 259 | link->conf.IntType = INT_MEMORY_AND_IO; |
@@ -425,8 +421,6 @@ static int fmvj18x_config(struct pcmcia_device *link) | |||
425 | } | 421 | } |
426 | 422 | ||
427 | if (link->io.NumPorts2 != 0) { | 423 | if (link->io.NumPorts2 != 0) { |
428 | link->irq.Attributes = | ||
429 | IRQ_TYPE_DYNAMIC_SHARING; | ||
430 | ret = mfc_try_io_port(link); | 424 | ret = mfc_try_io_port(link); |
431 | if (ret != 0) goto failed; | 425 | if (ret != 0) goto failed; |
432 | } else if (cardtype == UNGERMANN) { | 426 | } else if (cardtype == UNGERMANN) { |
@@ -437,14 +431,14 @@ static int fmvj18x_config(struct pcmcia_device *link) | |||
437 | if (ret) | 431 | if (ret) |
438 | goto failed; | 432 | goto failed; |
439 | } | 433 | } |
440 | ret = pcmcia_request_irq(link, &link->irq); | 434 | ret = pcmcia_request_irq(link, fjn_interrupt); |
441 | if (ret) | 435 | if (ret) |
442 | goto failed; | 436 | goto failed; |
443 | ret = pcmcia_request_configuration(link, &link->conf); | 437 | ret = pcmcia_request_configuration(link, &link->conf); |
444 | if (ret) | 438 | if (ret) |
445 | goto failed; | 439 | goto failed; |
446 | 440 | ||
447 | dev->irq = link->irq.AssignedIRQ; | 441 | dev->irq = link->irq; |
448 | dev->base_addr = link->io.BasePort1; | 442 | dev->base_addr = link->io.BasePort1; |
449 | 443 | ||
450 | if (link->io.BasePort2 != 0) { | 444 | if (link->io.BasePort2 != 0) { |
diff --git a/drivers/net/pcmcia/ibmtr_cs.c b/drivers/net/pcmcia/ibmtr_cs.c index 37f4a6fdc3ef..0225cdffa4b9 100644 --- a/drivers/net/pcmcia/ibmtr_cs.c +++ b/drivers/net/pcmcia/ibmtr_cs.c | |||
@@ -156,8 +156,6 @@ static int __devinit ibmtr_attach(struct pcmcia_device *link) | |||
156 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 156 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; |
157 | link->io.NumPorts1 = 4; | 157 | link->io.NumPorts1 = 4; |
158 | link->io.IOAddrLines = 16; | 158 | link->io.IOAddrLines = 16; |
159 | link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; | ||
160 | link->irq.Handler = ibmtr_interrupt; | ||
161 | link->conf.Attributes = CONF_ENABLE_IRQ; | 159 | link->conf.Attributes = CONF_ENABLE_IRQ; |
162 | link->conf.IntType = INT_MEMORY_AND_IO; | 160 | link->conf.IntType = INT_MEMORY_AND_IO; |
163 | link->conf.Present = PRESENT_OPTION; | 161 | link->conf.Present = PRESENT_OPTION; |
@@ -238,11 +236,11 @@ static int __devinit ibmtr_config(struct pcmcia_device *link) | |||
238 | } | 236 | } |
239 | dev->base_addr = link->io.BasePort1; | 237 | dev->base_addr = link->io.BasePort1; |
240 | 238 | ||
241 | ret = pcmcia_request_irq(link, &link->irq); | 239 | ret = pcmcia_request_exclusive_irq(link, ibmtr_interrupt); |
242 | if (ret) | 240 | if (ret) |
243 | goto failed; | 241 | goto failed; |
244 | dev->irq = link->irq.AssignedIRQ; | 242 | dev->irq = link->irq; |
245 | ti->irq = link->irq.AssignedIRQ; | 243 | ti->irq = link->irq; |
246 | ti->global_int_enable=GLOBAL_INT_ENABLE+((dev->irq==9) ? 2 : dev->irq); | 244 | ti->global_int_enable=GLOBAL_INT_ENABLE+((dev->irq==9) ? 2 : dev->irq); |
247 | 245 | ||
248 | /* Allocate the MMIO memory window */ | 246 | /* Allocate the MMIO memory window */ |
diff --git a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c index c717b143f11a..b779e3a0b4dd 100644 --- a/drivers/net/pcmcia/nmclan_cs.c +++ b/drivers/net/pcmcia/nmclan_cs.c | |||
@@ -463,8 +463,6 @@ static int nmclan_probe(struct pcmcia_device *link) | |||
463 | link->io.NumPorts1 = 32; | 463 | link->io.NumPorts1 = 32; |
464 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; | 464 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; |
465 | link->io.IOAddrLines = 5; | 465 | link->io.IOAddrLines = 5; |
466 | link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; | ||
467 | link->irq.Handler = mace_interrupt; | ||
468 | link->conf.Attributes = CONF_ENABLE_IRQ; | 466 | link->conf.Attributes = CONF_ENABLE_IRQ; |
469 | link->conf.IntType = INT_MEMORY_AND_IO; | 467 | link->conf.IntType = INT_MEMORY_AND_IO; |
470 | link->conf.ConfigIndex = 1; | 468 | link->conf.ConfigIndex = 1; |
@@ -652,14 +650,14 @@ static int nmclan_config(struct pcmcia_device *link) | |||
652 | ret = pcmcia_request_io(link, &link->io); | 650 | ret = pcmcia_request_io(link, &link->io); |
653 | if (ret) | 651 | if (ret) |
654 | goto failed; | 652 | goto failed; |
655 | ret = pcmcia_request_irq(link, &link->irq); | 653 | ret = pcmcia_request_exclusive_irq(link, mace_interrupt); |
656 | if (ret) | 654 | if (ret) |
657 | goto failed; | 655 | goto failed; |
658 | ret = pcmcia_request_configuration(link, &link->conf); | 656 | ret = pcmcia_request_configuration(link, &link->conf); |
659 | if (ret) | 657 | if (ret) |
660 | goto failed; | 658 | goto failed; |
661 | 659 | ||
662 | dev->irq = link->irq.AssignedIRQ; | 660 | dev->irq = link->irq; |
663 | dev->base_addr = link->io.BasePort1; | 661 | dev->base_addr = link->io.BasePort1; |
664 | 662 | ||
665 | ioaddr = dev->base_addr; | 663 | ioaddr = dev->base_addr; |
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c index 4c0368de1815..af09be487577 100644 --- a/drivers/net/pcmcia/pcnet_cs.c +++ b/drivers/net/pcmcia/pcnet_cs.c | |||
@@ -264,7 +264,6 @@ static int pcnet_probe(struct pcmcia_device *link) | |||
264 | info->p_dev = link; | 264 | info->p_dev = link; |
265 | link->priv = dev; | 265 | link->priv = dev; |
266 | 266 | ||
267 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
268 | link->conf.Attributes = CONF_ENABLE_IRQ; | 267 | link->conf.Attributes = CONF_ENABLE_IRQ; |
269 | link->conf.IntType = INT_MEMORY_AND_IO; | 268 | link->conf.IntType = INT_MEMORY_AND_IO; |
270 | 269 | ||
@@ -488,8 +487,6 @@ static int try_io_port(struct pcmcia_device *link) | |||
488 | if (link->io.NumPorts2 > 0) { | 487 | if (link->io.NumPorts2 > 0) { |
489 | /* for master/slave multifunction cards */ | 488 | /* for master/slave multifunction cards */ |
490 | link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; | 489 | link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; |
491 | link->irq.Attributes = | ||
492 | IRQ_TYPE_DYNAMIC_SHARING; | ||
493 | } | 490 | } |
494 | } else { | 491 | } else { |
495 | /* This should be two 16-port windows */ | 492 | /* This should be two 16-port windows */ |
@@ -559,8 +556,7 @@ static int pcnet_config(struct pcmcia_device *link) | |||
559 | if (ret) | 556 | if (ret) |
560 | goto failed; | 557 | goto failed; |
561 | 558 | ||
562 | ret = pcmcia_request_irq(link, &link->irq); | 559 | if (!link->irq) |
563 | if (ret) | ||
564 | goto failed; | 560 | goto failed; |
565 | 561 | ||
566 | if (link->io.NumPorts2 == 8) { | 562 | if (link->io.NumPorts2 == 8) { |
@@ -574,7 +570,7 @@ static int pcnet_config(struct pcmcia_device *link) | |||
574 | ret = pcmcia_request_configuration(link, &link->conf); | 570 | ret = pcmcia_request_configuration(link, &link->conf); |
575 | if (ret) | 571 | if (ret) |
576 | goto failed; | 572 | goto failed; |
577 | dev->irq = link->irq.AssignedIRQ; | 573 | dev->irq = link->irq; |
578 | dev->base_addr = link->io.BasePort1; | 574 | dev->base_addr = link->io.BasePort1; |
579 | if (info->flags & HAS_MISC_REG) { | 575 | if (info->flags & HAS_MISC_REG) { |
580 | if ((if_port == 1) || (if_port == 2)) | 576 | if ((if_port == 1) || (if_port == 2)) |
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c index ccc553782a0d..ad061c7106b5 100644 --- a/drivers/net/pcmcia/smc91c92_cs.c +++ b/drivers/net/pcmcia/smc91c92_cs.c | |||
@@ -329,8 +329,6 @@ static int smc91c92_probe(struct pcmcia_device *link) | |||
329 | link->io.NumPorts1 = 16; | 329 | link->io.NumPorts1 = 16; |
330 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; | 330 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; |
331 | link->io.IOAddrLines = 4; | 331 | link->io.IOAddrLines = 4; |
332 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
333 | link->irq.Handler = &smc_interrupt; | ||
334 | link->conf.Attributes = CONF_ENABLE_IRQ; | 332 | link->conf.Attributes = CONF_ENABLE_IRQ; |
335 | link->conf.IntType = INT_MEMORY_AND_IO; | 333 | link->conf.IntType = INT_MEMORY_AND_IO; |
336 | 334 | ||
@@ -453,7 +451,6 @@ static int mhz_mfc_config(struct pcmcia_device *link) | |||
453 | 451 | ||
454 | link->conf.Attributes |= CONF_ENABLE_SPKR; | 452 | link->conf.Attributes |= CONF_ENABLE_SPKR; |
455 | link->conf.Status = CCSR_AUDIO_ENA; | 453 | link->conf.Status = CCSR_AUDIO_ENA; |
456 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
457 | link->io.IOAddrLines = 16; | 454 | link->io.IOAddrLines = 16; |
458 | link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; | 455 | link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; |
459 | link->io.NumPorts2 = 8; | 456 | link->io.NumPorts2 = 8; |
@@ -652,7 +649,6 @@ static int osi_config(struct pcmcia_device *link) | |||
652 | 649 | ||
653 | link->conf.Attributes |= CONF_ENABLE_SPKR; | 650 | link->conf.Attributes |= CONF_ENABLE_SPKR; |
654 | link->conf.Status = CCSR_AUDIO_ENA; | 651 | link->conf.Status = CCSR_AUDIO_ENA; |
655 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
656 | link->io.NumPorts1 = 64; | 652 | link->io.NumPorts1 = 64; |
657 | link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; | 653 | link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; |
658 | link->io.NumPorts2 = 8; | 654 | link->io.NumPorts2 = 8; |
@@ -877,7 +873,7 @@ static int smc91c92_config(struct pcmcia_device *link) | |||
877 | if (i) | 873 | if (i) |
878 | goto config_failed; | 874 | goto config_failed; |
879 | 875 | ||
880 | i = pcmcia_request_irq(link, &link->irq); | 876 | i = pcmcia_request_irq(link, smc_interrupt); |
881 | if (i) | 877 | if (i) |
882 | goto config_failed; | 878 | goto config_failed; |
883 | i = pcmcia_request_configuration(link, &link->conf); | 879 | i = pcmcia_request_configuration(link, &link->conf); |
@@ -887,7 +883,7 @@ static int smc91c92_config(struct pcmcia_device *link) | |||
887 | if (smc->manfid == MANFID_MOTOROLA) | 883 | if (smc->manfid == MANFID_MOTOROLA) |
888 | mot_config(link); | 884 | mot_config(link); |
889 | 885 | ||
890 | dev->irq = link->irq.AssignedIRQ; | 886 | dev->irq = link->irq; |
891 | 887 | ||
892 | if ((if_port >= 0) && (if_port <= 2)) | 888 | if ((if_port >= 0) && (if_port <= 2)) |
893 | dev->if_port = if_port; | 889 | dev->if_port = if_port; |
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c index 4d1802e457be..c9e7d7d47835 100644 --- a/drivers/net/pcmcia/xirc2ps_cs.c +++ b/drivers/net/pcmcia/xirc2ps_cs.c | |||
@@ -555,7 +555,6 @@ xirc2ps_probe(struct pcmcia_device *link) | |||
555 | link->conf.Attributes = CONF_ENABLE_IRQ; | 555 | link->conf.Attributes = CONF_ENABLE_IRQ; |
556 | link->conf.IntType = INT_MEMORY_AND_IO; | 556 | link->conf.IntType = INT_MEMORY_AND_IO; |
557 | link->conf.ConfigIndex = 1; | 557 | link->conf.ConfigIndex = 1; |
558 | link->irq.Handler = xirc2ps_interrupt; | ||
559 | 558 | ||
560 | /* Fill in card specific entries */ | 559 | /* Fill in card specific entries */ |
561 | dev->netdev_ops = &netdev_ops; | 560 | dev->netdev_ops = &netdev_ops; |
@@ -841,7 +840,6 @@ xirc2ps_config(struct pcmcia_device * link) | |||
841 | link->conf.Attributes |= CONF_ENABLE_SPKR; | 840 | link->conf.Attributes |= CONF_ENABLE_SPKR; |
842 | link->conf.Status |= CCSR_AUDIO_ENA; | 841 | link->conf.Status |= CCSR_AUDIO_ENA; |
843 | } | 842 | } |
844 | link->irq.Attributes |= IRQ_TYPE_DYNAMIC_SHARING; | ||
845 | link->io.NumPorts2 = 8; | 843 | link->io.NumPorts2 = 8; |
846 | link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; | 844 | link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; |
847 | if (local->dingo) { | 845 | if (local->dingo) { |
@@ -866,7 +864,6 @@ xirc2ps_config(struct pcmcia_device * link) | |||
866 | } | 864 | } |
867 | printk(KNOT_XIRC "no ports available\n"); | 865 | printk(KNOT_XIRC "no ports available\n"); |
868 | } else { | 866 | } else { |
869 | link->irq.Attributes |= IRQ_TYPE_DYNAMIC_SHARING; | ||
870 | link->io.NumPorts1 = 16; | 867 | link->io.NumPorts1 = 16; |
871 | for (ioaddr = 0x300; ioaddr < 0x400; ioaddr += 0x10) { | 868 | for (ioaddr = 0x300; ioaddr < 0x400; ioaddr += 0x10) { |
872 | link->io.BasePort1 = ioaddr; | 869 | link->io.BasePort1 = ioaddr; |
@@ -885,7 +882,7 @@ xirc2ps_config(struct pcmcia_device * link) | |||
885 | * Now allocate an interrupt line. Note that this does not | 882 | * Now allocate an interrupt line. Note that this does not |
886 | * actually assign a handler to the interrupt. | 883 | * actually assign a handler to the interrupt. |
887 | */ | 884 | */ |
888 | if ((err=pcmcia_request_irq(link, &link->irq))) | 885 | if ((err=pcmcia_request_irq(link, xirc2ps_interrupt))) |
889 | goto config_error; | 886 | goto config_error; |
890 | 887 | ||
891 | /**************** | 888 | /**************** |
@@ -982,7 +979,7 @@ xirc2ps_config(struct pcmcia_device * link) | |||
982 | printk(KNOT_XIRC "invalid if_port requested\n"); | 979 | printk(KNOT_XIRC "invalid if_port requested\n"); |
983 | 980 | ||
984 | /* we can now register the device with the net subsystem */ | 981 | /* we can now register the device with the net subsystem */ |
985 | dev->irq = link->irq.AssignedIRQ; | 982 | dev->irq = link->irq; |
986 | dev->base_addr = link->io.BasePort1; | 983 | dev->base_addr = link->io.BasePort1; |
987 | 984 | ||
988 | if (local->dingo) | 985 | if (local->dingo) |
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c index f6036fb42319..7867c51be15f 100644 --- a/drivers/net/wireless/airo_cs.c +++ b/drivers/net/wireless/airo_cs.c | |||
@@ -132,10 +132,6 @@ static int airo_probe(struct pcmcia_device *p_dev) | |||
132 | 132 | ||
133 | dev_dbg(&p_dev->dev, "airo_attach()\n"); | 133 | dev_dbg(&p_dev->dev, "airo_attach()\n"); |
134 | 134 | ||
135 | /* Interrupt setup */ | ||
136 | p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
137 | p_dev->irq.Handler = NULL; | ||
138 | |||
139 | /* | 135 | /* |
140 | General socket configuration defaults can go here. In this | 136 | General socket configuration defaults can go here. In this |
141 | client, we assume very little, and rely on the CIS for almost | 137 | client, we assume very little, and rely on the CIS for almost |
@@ -212,9 +208,7 @@ static int airo_cs_config_check(struct pcmcia_device *p_dev, | |||
212 | else if (dflt->vpp1.present & (1<<CISTPL_POWER_VNOM)) | 208 | else if (dflt->vpp1.present & (1<<CISTPL_POWER_VNOM)) |
213 | p_dev->conf.Vpp = dflt->vpp1.param[CISTPL_POWER_VNOM]/10000; | 209 | p_dev->conf.Vpp = dflt->vpp1.param[CISTPL_POWER_VNOM]/10000; |
214 | 210 | ||
215 | /* Do we need to allocate an interrupt? */ | 211 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; |
216 | if (cfg->irq.IRQInfo1 || dflt->irq.IRQInfo1) | ||
217 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; | ||
218 | 212 | ||
219 | /* IO window settings */ | 213 | /* IO window settings */ |
220 | p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; | 214 | p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; |
@@ -300,16 +294,8 @@ static int airo_config(struct pcmcia_device *link) | |||
300 | if (ret) | 294 | if (ret) |
301 | goto failed; | 295 | goto failed; |
302 | 296 | ||
303 | /* | 297 | if (!link->irq) |
304 | Allocate an interrupt line. Note that this does not assign a | 298 | goto failed; |
305 | handler to the interrupt, unless the 'Handler' member of the | ||
306 | irq structure is initialized. | ||
307 | */ | ||
308 | if (link->conf.Attributes & CONF_ENABLE_IRQ) { | ||
309 | ret = pcmcia_request_irq(link, &link->irq); | ||
310 | if (ret) | ||
311 | goto failed; | ||
312 | } | ||
313 | 299 | ||
314 | /* | 300 | /* |
315 | This actually configures the PCMCIA socket -- setting up | 301 | This actually configures the PCMCIA socket -- setting up |
@@ -320,7 +306,7 @@ static int airo_config(struct pcmcia_device *link) | |||
320 | if (ret) | 306 | if (ret) |
321 | goto failed; | 307 | goto failed; |
322 | ((local_info_t *)link->priv)->eth_dev = | 308 | ((local_info_t *)link->priv)->eth_dev = |
323 | init_airo_card(link->irq.AssignedIRQ, | 309 | init_airo_card(link->irq, |
324 | link->io.BasePort1, 1, &link->dev); | 310 | link->io.BasePort1, 1, &link->dev); |
325 | if (!((local_info_t *)link->priv)->eth_dev) | 311 | if (!((local_info_t *)link->priv)->eth_dev) |
326 | goto failed; | 312 | goto failed; |
@@ -338,8 +324,7 @@ static int airo_config(struct pcmcia_device *link) | |||
338 | dev->node.dev_name, link->conf.ConfigIndex); | 324 | dev->node.dev_name, link->conf.ConfigIndex); |
339 | if (link->conf.Vpp) | 325 | if (link->conf.Vpp) |
340 | printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10); | 326 | printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10); |
341 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 327 | printk(", irq %d", link->irq); |
342 | printk(", irq %d", link->irq.AssignedIRQ); | ||
343 | if (link->io.NumPorts1) | 328 | if (link->io.NumPorts1) |
344 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 329 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, |
345 | link->io.BasePort1+link->io.NumPorts1-1); | 330 | link->io.BasePort1+link->io.NumPorts1-1); |
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c index 32407911842f..759cdc419326 100644 --- a/drivers/net/wireless/atmel_cs.c +++ b/drivers/net/wireless/atmel_cs.c | |||
@@ -141,10 +141,6 @@ static int atmel_probe(struct pcmcia_device *p_dev) | |||
141 | 141 | ||
142 | dev_dbg(&p_dev->dev, "atmel_attach()\n"); | 142 | dev_dbg(&p_dev->dev, "atmel_attach()\n"); |
143 | 143 | ||
144 | /* Interrupt setup */ | ||
145 | p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
146 | p_dev->irq.Handler = NULL; | ||
147 | |||
148 | /* | 144 | /* |
149 | General socket configuration defaults can go here. In this | 145 | General socket configuration defaults can go here. In this |
150 | client, we assume very little, and rely on the CIS for almost | 146 | client, we assume very little, and rely on the CIS for almost |
@@ -226,9 +222,7 @@ static int atmel_config_check(struct pcmcia_device *p_dev, | |||
226 | else if (dflt->vpp1.present & (1<<CISTPL_POWER_VNOM)) | 222 | else if (dflt->vpp1.present & (1<<CISTPL_POWER_VNOM)) |
227 | p_dev->conf.Vpp = dflt->vpp1.param[CISTPL_POWER_VNOM]/10000; | 223 | p_dev->conf.Vpp = dflt->vpp1.param[CISTPL_POWER_VNOM]/10000; |
228 | 224 | ||
229 | /* Do we need to allocate an interrupt? */ | 225 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; |
230 | if (cfg->irq.IRQInfo1 || dflt->irq.IRQInfo1) | ||
231 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; | ||
232 | 226 | ||
233 | /* IO window settings */ | 227 | /* IO window settings */ |
234 | p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; | 228 | p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; |
@@ -278,15 +272,9 @@ static int atmel_config(struct pcmcia_device *link) | |||
278 | if (pcmcia_loop_config(link, atmel_config_check, NULL)) | 272 | if (pcmcia_loop_config(link, atmel_config_check, NULL)) |
279 | goto failed; | 273 | goto failed; |
280 | 274 | ||
281 | /* | 275 | if (!link->irq) { |
282 | Allocate an interrupt line. Note that this does not assign a | 276 | dev_err(&link->dev, "atmel: cannot assign IRQ: check that CONFIG_ISA is set in kernel config."); |
283 | handler to the interrupt, unless the 'Handler' member of the | 277 | goto failed; |
284 | irq structure is initialized. | ||
285 | */ | ||
286 | if (link->conf.Attributes & CONF_ENABLE_IRQ) { | ||
287 | ret = pcmcia_request_irq(link, &link->irq); | ||
288 | if (ret) | ||
289 | goto failed; | ||
290 | } | 278 | } |
291 | 279 | ||
292 | /* | 280 | /* |
@@ -298,14 +286,8 @@ static int atmel_config(struct pcmcia_device *link) | |||
298 | if (ret) | 286 | if (ret) |
299 | goto failed; | 287 | goto failed; |
300 | 288 | ||
301 | if (link->irq.AssignedIRQ == 0) { | ||
302 | printk(KERN_ALERT | ||
303 | "atmel: cannot assign IRQ: check that CONFIG_ISA is set in kernel config."); | ||
304 | goto failed; | ||
305 | } | ||
306 | |||
307 | ((local_info_t*)link->priv)->eth_dev = | 289 | ((local_info_t*)link->priv)->eth_dev = |
308 | init_atmel_card(link->irq.AssignedIRQ, | 290 | init_atmel_card(link->irq, |
309 | link->io.BasePort1, | 291 | link->io.BasePort1, |
310 | did ? did->driver_info : ATMEL_FW_TYPE_NONE, | 292 | did ? did->driver_info : ATMEL_FW_TYPE_NONE, |
311 | &link->dev, | 293 | &link->dev, |
diff --git a/drivers/net/wireless/b43/pcmcia.c b/drivers/net/wireless/b43/pcmcia.c index 609e7051e018..0e99b634267c 100644 --- a/drivers/net/wireless/b43/pcmcia.c +++ b/drivers/net/wireless/b43/pcmcia.c | |||
@@ -98,10 +98,7 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev) | |||
98 | if (res != 0) | 98 | if (res != 0) |
99 | goto err_disable; | 99 | goto err_disable; |
100 | 100 | ||
101 | dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | 101 | if (!dev->irq) |
102 | dev->irq.Handler = NULL; /* The handler is registered later. */ | ||
103 | res = pcmcia_request_irq(dev, &dev->irq); | ||
104 | if (res != 0) | ||
105 | goto err_disable; | 102 | goto err_disable; |
106 | 103 | ||
107 | res = pcmcia_request_configuration(dev, &dev->conf); | 104 | res = pcmcia_request_configuration(dev, &dev->conf); |
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); |
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c index 6d55439a7b97..08e4e3908003 100644 --- a/drivers/net/wireless/libertas/if_cs.c +++ b/drivers/net/wireless/libertas/if_cs.c | |||
@@ -777,7 +777,7 @@ static void if_cs_release(struct pcmcia_device *p_dev) | |||
777 | 777 | ||
778 | lbs_deb_enter(LBS_DEB_CS); | 778 | lbs_deb_enter(LBS_DEB_CS); |
779 | 779 | ||
780 | free_irq(p_dev->irq.AssignedIRQ, card); | 780 | free_irq(p_dev->irq, card); |
781 | pcmcia_disable_device(p_dev); | 781 | pcmcia_disable_device(p_dev); |
782 | if (card->iobase) | 782 | if (card->iobase) |
783 | ioport_unmap(card->iobase); | 783 | ioport_unmap(card->iobase); |
@@ -807,8 +807,7 @@ static int if_cs_ioprobe(struct pcmcia_device *p_dev, | |||
807 | p_dev->io.NumPorts1 = cfg->io.win[0].len; | 807 | p_dev->io.NumPorts1 = cfg->io.win[0].len; |
808 | 808 | ||
809 | /* Do we need to allocate an interrupt? */ | 809 | /* Do we need to allocate an interrupt? */ |
810 | if (cfg->irq.IRQInfo1) | 810 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; |
811 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; | ||
812 | 811 | ||
813 | /* IO window settings */ | 812 | /* IO window settings */ |
814 | if (cfg->io.nwin != 1) { | 813 | if (cfg->io.nwin != 1) { |
@@ -837,9 +836,6 @@ static int if_cs_probe(struct pcmcia_device *p_dev) | |||
837 | card->p_dev = p_dev; | 836 | card->p_dev = p_dev; |
838 | p_dev->priv = card; | 837 | p_dev->priv = card; |
839 | 838 | ||
840 | p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
841 | p_dev->irq.Handler = NULL; | ||
842 | |||
843 | p_dev->conf.Attributes = 0; | 839 | p_dev->conf.Attributes = 0; |
844 | p_dev->conf.IntType = INT_MEMORY_AND_IO; | 840 | p_dev->conf.IntType = INT_MEMORY_AND_IO; |
845 | 841 | ||
@@ -854,13 +850,8 @@ static int if_cs_probe(struct pcmcia_device *p_dev) | |||
854 | * a handler to the interrupt, unless the 'Handler' member of | 850 | * a handler to the interrupt, unless the 'Handler' member of |
855 | * the irq structure is initialized. | 851 | * the irq structure is initialized. |
856 | */ | 852 | */ |
857 | if (p_dev->conf.Attributes & CONF_ENABLE_IRQ) { | 853 | if (!p_dev->irq) |
858 | ret = pcmcia_request_irq(p_dev, &p_dev->irq); | 854 | goto out1; |
859 | if (ret) { | ||
860 | lbs_pr_err("error in pcmcia_request_irq\n"); | ||
861 | goto out1; | ||
862 | } | ||
863 | } | ||
864 | 855 | ||
865 | /* Initialize io access */ | 856 | /* Initialize io access */ |
866 | card->iobase = ioport_map(p_dev->io.BasePort1, p_dev->io.NumPorts1); | 857 | card->iobase = ioport_map(p_dev->io.BasePort1, p_dev->io.NumPorts1); |
@@ -883,7 +874,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev) | |||
883 | 874 | ||
884 | /* Finally, report what we've done */ | 875 | /* Finally, report what we've done */ |
885 | lbs_deb_cs("irq %d, io 0x%04x-0x%04x\n", | 876 | lbs_deb_cs("irq %d, io 0x%04x-0x%04x\n", |
886 | p_dev->irq.AssignedIRQ, p_dev->io.BasePort1, | 877 | p_dev->irq, p_dev->io.BasePort1, |
887 | p_dev->io.BasePort1 + p_dev->io.NumPorts1 - 1); | 878 | p_dev->io.BasePort1 + p_dev->io.NumPorts1 - 1); |
888 | 879 | ||
889 | /* | 880 | /* |
@@ -940,7 +931,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev) | |||
940 | priv->fw_ready = 1; | 931 | priv->fw_ready = 1; |
941 | 932 | ||
942 | /* Now actually get the IRQ */ | 933 | /* Now actually get the IRQ */ |
943 | ret = request_irq(p_dev->irq.AssignedIRQ, if_cs_interrupt, | 934 | ret = request_irq(p_dev->irq, if_cs_interrupt, |
944 | IRQF_SHARED, DRV_NAME, card); | 935 | IRQF_SHARED, DRV_NAME, card); |
945 | if (ret) { | 936 | if (ret) { |
946 | lbs_pr_err("error in request_irq\n"); | 937 | lbs_pr_err("error in request_irq\n"); |
diff --git a/drivers/net/wireless/orinoco/orinoco_cs.c b/drivers/net/wireless/orinoco/orinoco_cs.c index 1d4ada188eda..5d29b11fdbc0 100644 --- a/drivers/net/wireless/orinoco/orinoco_cs.c +++ b/drivers/net/wireless/orinoco/orinoco_cs.c | |||
@@ -119,10 +119,6 @@ orinoco_cs_probe(struct pcmcia_device *link) | |||
119 | card->p_dev = link; | 119 | card->p_dev = link; |
120 | link->priv = priv; | 120 | link->priv = priv; |
121 | 121 | ||
122 | /* Interrupt setup */ | ||
123 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
124 | link->irq.Handler = orinoco_interrupt; | ||
125 | |||
126 | /* General socket configuration defaults can go here. In this | 122 | /* General socket configuration defaults can go here. In this |
127 | * client, we assume very little, and rely on the CIS for | 123 | * client, we assume very little, and rely on the CIS for |
128 | * almost everything. In most clients, many details (i.e., | 124 | * almost everything. In most clients, many details (i.e., |
@@ -258,12 +254,7 @@ orinoco_cs_config(struct pcmcia_device *link) | |||
258 | goto failed; | 254 | goto failed; |
259 | } | 255 | } |
260 | 256 | ||
261 | /* | 257 | ret = pcmcia_request_irq(link, orinoco_interrupt); |
262 | * Allocate an interrupt line. Note that this does not assign | ||
263 | * a handler to the interrupt, unless the 'Handler' member of | ||
264 | * the irq structure is initialized. | ||
265 | */ | ||
266 | ret = pcmcia_request_irq(link, &link->irq); | ||
267 | if (ret) | 258 | if (ret) |
268 | goto failed; | 259 | goto failed; |
269 | 260 | ||
@@ -296,7 +287,7 @@ orinoco_cs_config(struct pcmcia_device *link) | |||
296 | 287 | ||
297 | /* Register an interface with the stack */ | 288 | /* Register an interface with the stack */ |
298 | if (orinoco_if_add(priv, link->io.BasePort1, | 289 | if (orinoco_if_add(priv, link->io.BasePort1, |
299 | link->irq.AssignedIRQ) != 0) { | 290 | link->irq) != 0) { |
300 | printk(KERN_ERR PFX "orinoco_if_add() failed\n"); | 291 | printk(KERN_ERR PFX "orinoco_if_add() failed\n"); |
301 | goto failed; | 292 | goto failed; |
302 | } | 293 | } |
diff --git a/drivers/net/wireless/orinoco/spectrum_cs.c b/drivers/net/wireless/orinoco/spectrum_cs.c index 59bda240fdc2..7a8e056cd62d 100644 --- a/drivers/net/wireless/orinoco/spectrum_cs.c +++ b/drivers/net/wireless/orinoco/spectrum_cs.c | |||
@@ -193,10 +193,6 @@ spectrum_cs_probe(struct pcmcia_device *link) | |||
193 | card->p_dev = link; | 193 | card->p_dev = link; |
194 | link->priv = priv; | 194 | link->priv = priv; |
195 | 195 | ||
196 | /* Interrupt setup */ | ||
197 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
198 | link->irq.Handler = orinoco_interrupt; | ||
199 | |||
200 | /* General socket configuration defaults can go here. In this | 196 | /* General socket configuration defaults can go here. In this |
201 | * client, we assume very little, and rely on the CIS for | 197 | * client, we assume very little, and rely on the CIS for |
202 | * almost everything. In most clients, many details (i.e., | 198 | * almost everything. In most clients, many details (i.e., |
@@ -332,12 +328,7 @@ spectrum_cs_config(struct pcmcia_device *link) | |||
332 | goto failed; | 328 | goto failed; |
333 | } | 329 | } |
334 | 330 | ||
335 | /* | 331 | ret = pcmcia_request_irq(link, orinoco_interrupt); |
336 | * Allocate an interrupt line. Note that this does not assign | ||
337 | * a handler to the interrupt, unless the 'Handler' member of | ||
338 | * the irq structure is initialized. | ||
339 | */ | ||
340 | ret = pcmcia_request_irq(link, &link->irq); | ||
341 | if (ret) | 332 | if (ret) |
342 | goto failed; | 333 | goto failed; |
343 | 334 | ||
@@ -374,7 +365,7 @@ spectrum_cs_config(struct pcmcia_device *link) | |||
374 | 365 | ||
375 | /* Register an interface with the stack */ | 366 | /* Register an interface with the stack */ |
376 | if (orinoco_if_add(priv, link->io.BasePort1, | 367 | if (orinoco_if_add(priv, link->io.BasePort1, |
377 | link->irq.AssignedIRQ) != 0) { | 368 | link->irq) != 0) { |
378 | printk(KERN_ERR PFX "orinoco_if_add() failed\n"); | 369 | printk(KERN_ERR PFX "orinoco_if_add() failed\n"); |
379 | goto failed; | 370 | goto failed; |
380 | } | 371 | } |
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c index 11865ea21875..fe4642a49bfb 100644 --- a/drivers/net/wireless/ray_cs.c +++ b/drivers/net/wireless/ray_cs.c | |||
@@ -321,10 +321,6 @@ static int ray_probe(struct pcmcia_device *p_dev) | |||
321 | p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 321 | p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8; |
322 | p_dev->io.IOAddrLines = 5; | 322 | p_dev->io.IOAddrLines = 5; |
323 | 323 | ||
324 | /* Interrupt setup. For PCMCIA, driver takes what's given */ | ||
325 | p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
326 | p_dev->irq.Handler = &ray_interrupt; | ||
327 | |||
328 | /* General socket configuration */ | 324 | /* General socket configuration */ |
329 | p_dev->conf.Attributes = CONF_ENABLE_IRQ; | 325 | p_dev->conf.Attributes = CONF_ENABLE_IRQ; |
330 | p_dev->conf.IntType = INT_MEMORY_AND_IO; | 326 | p_dev->conf.IntType = INT_MEMORY_AND_IO; |
@@ -417,10 +413,10 @@ static int ray_config(struct pcmcia_device *link) | |||
417 | /* Now allocate an interrupt line. Note that this does not | 413 | /* Now allocate an interrupt line. Note that this does not |
418 | actually assign a handler to the interrupt. | 414 | actually assign a handler to the interrupt. |
419 | */ | 415 | */ |
420 | ret = pcmcia_request_irq(link, &link->irq); | 416 | ret = pcmcia_request_irq(link, ray_interrupt); |
421 | if (ret) | 417 | if (ret) |
422 | goto failed; | 418 | goto failed; |
423 | dev->irq = link->irq.AssignedIRQ; | 419 | dev->irq = link->irq; |
424 | 420 | ||
425 | /* This actually configures the PCMCIA socket -- setting up | 421 | /* This actually configures the PCMCIA socket -- setting up |
426 | the I/O windows and the interrupt mapping. | 422 | the I/O windows and the interrupt mapping. |
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c index 7b9621de239f..c43f05b98c4e 100644 --- a/drivers/net/wireless/wl3501_cs.c +++ b/drivers/net/wireless/wl3501_cs.c | |||
@@ -1897,10 +1897,6 @@ static int wl3501_probe(struct pcmcia_device *p_dev) | |||
1897 | p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 1897 | p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8; |
1898 | p_dev->io.IOAddrLines = 5; | 1898 | p_dev->io.IOAddrLines = 5; |
1899 | 1899 | ||
1900 | /* Interrupt setup */ | ||
1901 | p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
1902 | p_dev->irq.Handler = wl3501_interrupt; | ||
1903 | |||
1904 | /* General socket configuration */ | 1900 | /* General socket configuration */ |
1905 | p_dev->conf.Attributes = CONF_ENABLE_IRQ; | 1901 | p_dev->conf.Attributes = CONF_ENABLE_IRQ; |
1906 | p_dev->conf.IntType = INT_MEMORY_AND_IO; | 1902 | p_dev->conf.IntType = INT_MEMORY_AND_IO; |
@@ -1961,7 +1957,7 @@ static int wl3501_config(struct pcmcia_device *link) | |||
1961 | /* Now allocate an interrupt line. Note that this does not actually | 1957 | /* Now allocate an interrupt line. Note that this does not actually |
1962 | * assign a handler to the interrupt. */ | 1958 | * assign a handler to the interrupt. */ |
1963 | 1959 | ||
1964 | ret = pcmcia_request_irq(link, &link->irq); | 1960 | ret = pcmcia_request_irq(link, wl3501_interrupt); |
1965 | if (ret) | 1961 | if (ret) |
1966 | goto failed; | 1962 | goto failed; |
1967 | 1963 | ||
@@ -1972,7 +1968,7 @@ static int wl3501_config(struct pcmcia_device *link) | |||
1972 | if (ret) | 1968 | if (ret) |
1973 | goto failed; | 1969 | goto failed; |
1974 | 1970 | ||
1975 | dev->irq = link->irq.AssignedIRQ; | 1971 | dev->irq = link->irq; |
1976 | dev->base_addr = link->io.BasePort1; | 1972 | dev->base_addr = link->io.BasePort1; |
1977 | SET_NETDEV_DEV(dev, &link->dev); | 1973 | SET_NETDEV_DEV(dev, &link->dev); |
1978 | if (register_netdev(dev)) { | 1974 | if (register_netdev(dev)) { |
diff --git a/drivers/parport/parport_cs.c b/drivers/parport/parport_cs.c index 7dd370fa3439..80c9052bf3cd 100644 --- a/drivers/parport/parport_cs.c +++ b/drivers/parport/parport_cs.c | |||
@@ -105,7 +105,6 @@ static int parport_probe(struct pcmcia_device *link) | |||
105 | 105 | ||
106 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 106 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; |
107 | link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; | 107 | link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; |
108 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
109 | link->conf.Attributes = CONF_ENABLE_IRQ; | 108 | link->conf.Attributes = CONF_ENABLE_IRQ; |
110 | link->conf.IntType = INT_MEMORY_AND_IO; | 109 | link->conf.IntType = INT_MEMORY_AND_IO; |
111 | 110 | ||
@@ -174,20 +173,19 @@ static int parport_config(struct pcmcia_device *link) | |||
174 | if (ret) | 173 | if (ret) |
175 | goto failed; | 174 | goto failed; |
176 | 175 | ||
177 | ret = pcmcia_request_irq(link, &link->irq); | 176 | if (!link->irq) |
178 | if (ret) | ||
179 | goto failed; | 177 | goto failed; |
180 | ret = pcmcia_request_configuration(link, &link->conf); | 178 | ret = pcmcia_request_configuration(link, &link->conf); |
181 | if (ret) | 179 | if (ret) |
182 | goto failed; | 180 | goto failed; |
183 | 181 | ||
184 | p = parport_pc_probe_port(link->io.BasePort1, link->io.BasePort2, | 182 | p = parport_pc_probe_port(link->io.BasePort1, link->io.BasePort2, |
185 | link->irq.AssignedIRQ, PARPORT_DMA_NONE, | 183 | link->irq, PARPORT_DMA_NONE, |
186 | &link->dev, IRQF_SHARED); | 184 | &link->dev, IRQF_SHARED); |
187 | if (p == NULL) { | 185 | if (p == NULL) { |
188 | printk(KERN_NOTICE "parport_cs: parport_pc_probe_port() at " | 186 | printk(KERN_NOTICE "parport_cs: parport_pc_probe_port() at " |
189 | "0x%3x, irq %u failed\n", link->io.BasePort1, | 187 | "0x%3x, irq %u failed\n", link->io.BasePort1, |
190 | link->irq.AssignedIRQ); | 188 | link->irq); |
191 | goto failed; | 189 | goto failed; |
192 | } | 190 | } |
193 | 191 | ||
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 5fd2948c7ed9..a2649c7b05bd 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c | |||
@@ -546,7 +546,6 @@ struct pcmcia_device *pcmcia_device_add(struct pcmcia_socket *s, unsigned int fu | |||
546 | p_dev->function_config = tmp_dev->function_config; | 546 | p_dev->function_config = tmp_dev->function_config; |
547 | p_dev->io = tmp_dev->io; | 547 | p_dev->io = tmp_dev->io; |
548 | p_dev->irq = tmp_dev->irq; | 548 | p_dev->irq = tmp_dev->irq; |
549 | p_dev->irq_v = tmp_dev->irq_v; | ||
550 | kref_get(&p_dev->function_config->ref); | 549 | kref_get(&p_dev->function_config->ref); |
551 | } | 550 | } |
552 | 551 | ||
@@ -571,7 +570,7 @@ struct pcmcia_device *pcmcia_device_add(struct pcmcia_socket *s, unsigned int fu | |||
571 | 570 | ||
572 | dev_printk(KERN_NOTICE, &p_dev->dev, | 571 | dev_printk(KERN_NOTICE, &p_dev->dev, |
573 | "pcmcia: registering new device %s (IRQ: %d)\n", | 572 | "pcmcia: registering new device %s (IRQ: %d)\n", |
574 | p_dev->devname, p_dev->irq_v); | 573 | p_dev->devname, p_dev->irq); |
575 | 574 | ||
576 | pcmcia_device_query(p_dev); | 575 | pcmcia_device_query(p_dev); |
577 | 576 | ||
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index 8dce223f3f44..f355c5ac407b 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c | |||
@@ -408,41 +408,6 @@ out: | |||
408 | } /* pcmcia_release_io */ | 408 | } /* pcmcia_release_io */ |
409 | 409 | ||
410 | 410 | ||
411 | static int pcmcia_release_irq(struct pcmcia_device *p_dev, irq_req_t *req) | ||
412 | { | ||
413 | struct pcmcia_socket *s = p_dev->socket; | ||
414 | config_t *c; | ||
415 | int ret = -EINVAL; | ||
416 | |||
417 | mutex_lock(&s->ops_mutex); | ||
418 | |||
419 | c = p_dev->function_config; | ||
420 | |||
421 | if (!p_dev->_irq) | ||
422 | goto out; | ||
423 | |||
424 | p_dev->_irq = 0; | ||
425 | |||
426 | if (c->state & CONFIG_LOCKED) | ||
427 | goto out; | ||
428 | |||
429 | if (s->pcmcia_irq != req->AssignedIRQ) { | ||
430 | dev_dbg(&s->dev, "IRQ must match assigned one\n"); | ||
431 | goto out; | ||
432 | } | ||
433 | |||
434 | if (req->Handler) | ||
435 | free_irq(req->AssignedIRQ, p_dev->priv); | ||
436 | |||
437 | ret = 0; | ||
438 | |||
439 | out: | ||
440 | mutex_unlock(&s->ops_mutex); | ||
441 | |||
442 | return ret; | ||
443 | } /* pcmcia_release_irq */ | ||
444 | |||
445 | |||
446 | int pcmcia_release_window(struct pcmcia_device *p_dev, window_handle_t wh) | 411 | int pcmcia_release_window(struct pcmcia_device *p_dev, window_handle_t wh) |
447 | { | 412 | { |
448 | struct pcmcia_socket *s = p_dev->socket; | 413 | struct pcmcia_socket *s = p_dev->socket; |
@@ -681,61 +646,66 @@ out: | |||
681 | EXPORT_SYMBOL(pcmcia_request_io); | 646 | EXPORT_SYMBOL(pcmcia_request_io); |
682 | 647 | ||
683 | 648 | ||
684 | /** pcmcia_request_irq | 649 | /** |
650 | * pcmcia_request_irq() - attempt to request a IRQ for a PCMCIA device | ||
685 | * | 651 | * |
686 | * Request_irq() reserves an irq for this client. | 652 | * pcmcia_request_irq() is a wrapper around request_irq which will allow |
653 | * the PCMCIA core to clean up the registration in pcmcia_disable_device(). | ||
654 | * Drivers are free to use request_irq() directly, but then they need to | ||
655 | * call free_irq themselfves, too. Also, only IRQF_SHARED capable IRQ | ||
656 | * handlers are allowed. | ||
687 | */ | 657 | */ |
688 | 658 | int __must_check pcmcia_request_irq(struct pcmcia_device *p_dev, | |
689 | int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req) | 659 | irq_handler_t handler) |
690 | { | 660 | { |
691 | struct pcmcia_socket *s = p_dev->socket; | 661 | int ret; |
692 | config_t *c; | ||
693 | int ret = -EINVAL, irq = p_dev->irq_v; | ||
694 | int type = IRQF_SHARED; | ||
695 | 662 | ||
696 | mutex_lock(&s->ops_mutex); | 663 | if (!p_dev->irq) |
664 | return -EINVAL; | ||
697 | 665 | ||
698 | if (!(s->state & SOCKET_PRESENT)) { | 666 | ret = request_irq(p_dev->irq, handler, IRQF_SHARED, |
699 | dev_dbg(&s->dev, "No card present\n"); | 667 | p_dev->devname, p_dev->priv); |
700 | goto out; | 668 | if (!ret) |
701 | } | 669 | p_dev->_irq = 1; |
702 | c = p_dev->function_config; | ||
703 | if (c->state & CONFIG_LOCKED) { | ||
704 | dev_dbg(&s->dev, "Configuration is locked\n"); | ||
705 | goto out; | ||
706 | } | ||
707 | 670 | ||
708 | if (!irq) { | 671 | return ret; |
709 | dev_dbg(&s->dev, "no IRQ available\n"); | 672 | } |
710 | goto out; | 673 | EXPORT_SYMBOL(pcmcia_request_irq); |
711 | } | ||
712 | 674 | ||
713 | if (!(req->Attributes & IRQ_TYPE_DYNAMIC_SHARING)) { | ||
714 | req->Attributes |= IRQ_TYPE_DYNAMIC_SHARING; | ||
715 | dev_printk(KERN_WARNING, &p_dev->dev, "pcmcia: the driver " | ||
716 | "needs updating to supported shared IRQ lines.\n"); | ||
717 | } | ||
718 | 675 | ||
719 | if (req->Handler) { | 676 | /** |
720 | ret = request_irq(irq, req->Handler, type, | 677 | * pcmcia_request_exclusive_irq() - attempt to request an exclusive IRQ first |
721 | p_dev->devname, p_dev->priv); | 678 | * |
722 | if (ret) { | 679 | * pcmcia_request_exclusive_irq() is a wrapper around request_irq which |
723 | dev_printk(KERN_INFO, &s->dev, | 680 | * attempts first to request an exclusive IRQ. If it fails, it also accepts |
724 | "request_irq() failed\n"); | 681 | * a shared IRQ, but prints out a warning. PCMCIA drivers should allow for |
725 | goto out; | 682 | * IRQ sharing and either use request_irq directly (then they need to call |
726 | } | 683 | * free_irq themselves, too), or the pcmcia_request_irq() function. |
727 | } | 684 | */ |
685 | int __must_check | ||
686 | pcmcia_request_exclusive_irq(struct pcmcia_device *p_dev, irq_handler_t handler) | ||
687 | { | ||
688 | int ret; | ||
728 | 689 | ||
729 | req->AssignedIRQ = irq; | 690 | if (!p_dev->irq) |
691 | return -EINVAL; | ||
730 | 692 | ||
731 | p_dev->_irq = 1; | 693 | ret = request_irq(p_dev->irq, handler, 0, p_dev->devname, p_dev->priv); |
694 | if (ret) { | ||
695 | ret = pcmcia_request_irq(p_dev, handler); | ||
696 | dev_printk(KERN_WARNING, &p_dev->dev, "pcmcia: " | ||
697 | "request for exclusive IRQ could not be fulfilled.\n"); | ||
698 | dev_printk(KERN_WARNING, &p_dev->dev, "pcmcia: the driver " | ||
699 | "needs updating to supported shared IRQ lines.\n"); | ||
700 | } | ||
701 | if (ret) | ||
702 | dev_printk(KERN_INFO, &p_dev->dev, "request_irq() failed\n"); | ||
703 | else | ||
704 | p_dev->_irq = 1; | ||
732 | 705 | ||
733 | ret = 0; | ||
734 | out: | ||
735 | mutex_unlock(&s->ops_mutex); | ||
736 | return ret; | 706 | return ret; |
737 | } /* pcmcia_request_irq */ | 707 | } /* pcmcia_request_exclusive_irq */ |
738 | EXPORT_SYMBOL(pcmcia_request_irq); | 708 | EXPORT_SYMBOL(pcmcia_request_exclusive_irq); |
739 | 709 | ||
740 | 710 | ||
741 | #ifdef CONFIG_PCMCIA_PROBE | 711 | #ifdef CONFIG_PCMCIA_PROBE |
@@ -779,7 +749,7 @@ static int pcmcia_setup_isa_irq(struct pcmcia_device *p_dev, int type) | |||
779 | p_dev); | 749 | p_dev); |
780 | if (!ret) { | 750 | if (!ret) { |
781 | free_irq(irq, p_dev); | 751 | free_irq(irq, p_dev); |
782 | p_dev->irq_v = s->pcmcia_irq = irq; | 752 | p_dev->irq = s->pcmcia_irq = irq; |
783 | pcmcia_used_irq[irq]++; | 753 | pcmcia_used_irq[irq]++; |
784 | break; | 754 | break; |
785 | } | 755 | } |
@@ -820,12 +790,12 @@ int pcmcia_setup_irq(struct pcmcia_device *p_dev) | |||
820 | { | 790 | { |
821 | struct pcmcia_socket *s = p_dev->socket; | 791 | struct pcmcia_socket *s = p_dev->socket; |
822 | 792 | ||
823 | if (p_dev->irq_v) | 793 | if (p_dev->irq) |
824 | return 0; | 794 | return 0; |
825 | 795 | ||
826 | /* already assigned? */ | 796 | /* already assigned? */ |
827 | if (s->pcmcia_irq) { | 797 | if (s->pcmcia_irq) { |
828 | p_dev->irq_v = s->pcmcia_irq; | 798 | p_dev->irq = s->pcmcia_irq; |
829 | return 0; | 799 | return 0; |
830 | } | 800 | } |
831 | 801 | ||
@@ -839,7 +809,7 @@ int pcmcia_setup_irq(struct pcmcia_device *p_dev) | |||
839 | 809 | ||
840 | /* but use the PCI irq otherwise */ | 810 | /* but use the PCI irq otherwise */ |
841 | if (s->pci_irq) { | 811 | if (s->pci_irq) { |
842 | p_dev->irq_v = s->pcmcia_irq = s->pci_irq; | 812 | p_dev->irq = s->pcmcia_irq = s->pci_irq; |
843 | return 0; | 813 | return 0; |
844 | } | 814 | } |
845 | 815 | ||
@@ -947,7 +917,8 @@ void pcmcia_disable_device(struct pcmcia_device *p_dev) | |||
947 | { | 917 | { |
948 | pcmcia_release_configuration(p_dev); | 918 | pcmcia_release_configuration(p_dev); |
949 | pcmcia_release_io(p_dev, &p_dev->io); | 919 | pcmcia_release_io(p_dev, &p_dev->io); |
950 | pcmcia_release_irq(p_dev, &p_dev->irq); | 920 | if (p_dev->_irq) |
921 | free_irq(p_dev->irq, p_dev->priv); | ||
951 | if (p_dev->win) | 922 | if (p_dev->win) |
952 | pcmcia_release_window(p_dev, p_dev->win); | 923 | pcmcia_release_window(p_dev, p_dev->win); |
953 | } | 924 | } |
diff --git a/drivers/scsi/pcmcia/aha152x_stub.c b/drivers/scsi/pcmcia/aha152x_stub.c index 528733b4a392..c1de4ba1f0a5 100644 --- a/drivers/scsi/pcmcia/aha152x_stub.c +++ b/drivers/scsi/pcmcia/aha152x_stub.c | |||
@@ -105,7 +105,6 @@ static int aha152x_probe(struct pcmcia_device *link) | |||
105 | link->io.NumPorts1 = 0x20; | 105 | link->io.NumPorts1 = 0x20; |
106 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; | 106 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; |
107 | link->io.IOAddrLines = 10; | 107 | link->io.IOAddrLines = 10; |
108 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
109 | link->conf.Attributes = CONF_ENABLE_IRQ; | 108 | link->conf.Attributes = CONF_ENABLE_IRQ; |
110 | link->conf.IntType = INT_MEMORY_AND_IO; | 109 | link->conf.IntType = INT_MEMORY_AND_IO; |
111 | link->conf.Present = PRESENT_OPTION; | 110 | link->conf.Present = PRESENT_OPTION; |
@@ -160,8 +159,7 @@ static int aha152x_config_cs(struct pcmcia_device *link) | |||
160 | if (ret) | 159 | if (ret) |
161 | goto failed; | 160 | goto failed; |
162 | 161 | ||
163 | ret = pcmcia_request_irq(link, &link->irq); | 162 | if (!link->irq) |
164 | if (ret) | ||
165 | goto failed; | 163 | goto failed; |
166 | 164 | ||
167 | ret = pcmcia_request_configuration(link, &link->conf); | 165 | ret = pcmcia_request_configuration(link, &link->conf); |
@@ -172,7 +170,7 @@ static int aha152x_config_cs(struct pcmcia_device *link) | |||
172 | memset(&s, 0, sizeof(s)); | 170 | memset(&s, 0, sizeof(s)); |
173 | s.conf = "PCMCIA setup"; | 171 | s.conf = "PCMCIA setup"; |
174 | s.io_port = link->io.BasePort1; | 172 | s.io_port = link->io.BasePort1; |
175 | s.irq = link->irq.AssignedIRQ; | 173 | s.irq = link->irq; |
176 | s.scsiid = host_id; | 174 | s.scsiid = host_id; |
177 | s.reconnect = reconnect; | 175 | s.reconnect = reconnect; |
178 | s.parity = parity; | 176 | s.parity = parity; |
diff --git a/drivers/scsi/pcmcia/fdomain_stub.c b/drivers/scsi/pcmcia/fdomain_stub.c index 914040684079..8cb6d71f0204 100644 --- a/drivers/scsi/pcmcia/fdomain_stub.c +++ b/drivers/scsi/pcmcia/fdomain_stub.c | |||
@@ -88,7 +88,6 @@ static int fdomain_probe(struct pcmcia_device *link) | |||
88 | link->io.NumPorts1 = 0x10; | 88 | link->io.NumPorts1 = 0x10; |
89 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; | 89 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; |
90 | link->io.IOAddrLines = 10; | 90 | link->io.IOAddrLines = 10; |
91 | link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; | ||
92 | link->conf.Attributes = CONF_ENABLE_IRQ; | 91 | link->conf.Attributes = CONF_ENABLE_IRQ; |
93 | link->conf.IntType = INT_MEMORY_AND_IO; | 92 | link->conf.IntType = INT_MEMORY_AND_IO; |
94 | link->conf.Present = PRESENT_OPTION; | 93 | link->conf.Present = PRESENT_OPTION; |
@@ -133,8 +132,7 @@ static int fdomain_config(struct pcmcia_device *link) | |||
133 | if (ret) | 132 | if (ret) |
134 | goto failed; | 133 | goto failed; |
135 | 134 | ||
136 | ret = pcmcia_request_irq(link, &link->irq); | 135 | if (!link->irq) |
137 | if (ret) | ||
138 | goto failed; | 136 | goto failed; |
139 | ret = pcmcia_request_configuration(link, &link->conf); | 137 | ret = pcmcia_request_configuration(link, &link->conf); |
140 | if (ret) | 138 | if (ret) |
@@ -144,7 +142,7 @@ static int fdomain_config(struct pcmcia_device *link) | |||
144 | release_region(link->io.BasePort1, link->io.NumPorts1); | 142 | release_region(link->io.BasePort1, link->io.NumPorts1); |
145 | 143 | ||
146 | /* Set configuration options for the fdomain driver */ | 144 | /* Set configuration options for the fdomain driver */ |
147 | sprintf(str, "%d,%d", link->io.BasePort1, link->irq.AssignedIRQ); | 145 | sprintf(str, "%d,%d", link->io.BasePort1, link->irq); |
148 | fdomain_setup(str); | 146 | fdomain_setup(str); |
149 | 147 | ||
150 | host = __fdomain_16x0_detect(&fdomain_driver_template); | 148 | host = __fdomain_16x0_detect(&fdomain_driver_template); |
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c index 021246454872..24c78ed98f07 100644 --- a/drivers/scsi/pcmcia/nsp_cs.c +++ b/drivers/scsi/pcmcia/nsp_cs.c | |||
@@ -1563,13 +1563,6 @@ static int nsp_cs_probe(struct pcmcia_device *link) | |||
1563 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; | 1563 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; |
1564 | link->io.IOAddrLines = 10; /* not used */ | 1564 | link->io.IOAddrLines = 10; /* not used */ |
1565 | 1565 | ||
1566 | /* Interrupt setup */ | ||
1567 | link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; | ||
1568 | |||
1569 | /* Interrupt handler */ | ||
1570 | link->irq.Handler = &nspintr; | ||
1571 | link->irq.Attributes |= IRQF_SHARED; | ||
1572 | |||
1573 | /* General socket configuration */ | 1566 | /* General socket configuration */ |
1574 | link->conf.Attributes = CONF_ENABLE_IRQ; | 1567 | link->conf.Attributes = CONF_ENABLE_IRQ; |
1575 | link->conf.IntType = INT_MEMORY_AND_IO; | 1568 | link->conf.IntType = INT_MEMORY_AND_IO; |
@@ -1646,8 +1639,7 @@ static int nsp_cs_config_check(struct pcmcia_device *p_dev, | |||
1646 | } | 1639 | } |
1647 | 1640 | ||
1648 | /* Do we need to allocate an interrupt? */ | 1641 | /* Do we need to allocate an interrupt? */ |
1649 | if (cfg->irq.IRQInfo1 || dflt->irq.IRQInfo1) | 1642 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; |
1650 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; | ||
1651 | 1643 | ||
1652 | /* IO window settings */ | 1644 | /* IO window settings */ |
1653 | p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; | 1645 | p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; |
@@ -1720,10 +1712,8 @@ static int nsp_cs_config(struct pcmcia_device *link) | |||
1720 | if (ret) | 1712 | if (ret) |
1721 | goto cs_failed; | 1713 | goto cs_failed; |
1722 | 1714 | ||
1723 | if (link->conf.Attributes & CONF_ENABLE_IRQ) { | 1715 | if (pcmcia_request_irq(link, nspintr)) |
1724 | if (pcmcia_request_irq(link, &link->irq)) | 1716 | goto cs_failed; |
1725 | goto cs_failed; | ||
1726 | } | ||
1727 | 1717 | ||
1728 | ret = pcmcia_request_configuration(link, &link->conf); | 1718 | ret = pcmcia_request_configuration(link, &link->conf); |
1729 | if (ret) | 1719 | if (ret) |
@@ -1741,7 +1731,7 @@ static int nsp_cs_config(struct pcmcia_device *link) | |||
1741 | /* Set port and IRQ */ | 1731 | /* Set port and IRQ */ |
1742 | data->BaseAddress = link->io.BasePort1; | 1732 | data->BaseAddress = link->io.BasePort1; |
1743 | data->NumAddress = link->io.NumPorts1; | 1733 | data->NumAddress = link->io.NumPorts1; |
1744 | data->IrqNumber = link->irq.AssignedIRQ; | 1734 | data->IrqNumber = link->irq; |
1745 | 1735 | ||
1746 | nsp_dbg(NSP_DEBUG_INIT, "I/O[0x%x+0x%x] IRQ %d", | 1736 | nsp_dbg(NSP_DEBUG_INIT, "I/O[0x%x+0x%x] IRQ %d", |
1747 | data->BaseAddress, data->NumAddress, data->IrqNumber); | 1737 | data->BaseAddress, data->NumAddress, data->IrqNumber); |
@@ -1775,7 +1765,7 @@ static int nsp_cs_config(struct pcmcia_device *link) | |||
1775 | printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10); | 1765 | printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10); |
1776 | } | 1766 | } |
1777 | if (link->conf.Attributes & CONF_ENABLE_IRQ) { | 1767 | if (link->conf.Attributes & CONF_ENABLE_IRQ) { |
1778 | printk(", irq %d", link->irq.AssignedIRQ); | 1768 | printk(", irq %d", link->irq); |
1779 | } | 1769 | } |
1780 | if (link->io.NumPorts1) { | 1770 | if (link->io.NumPorts1) { |
1781 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 1771 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, |
diff --git a/drivers/scsi/pcmcia/qlogic_stub.c b/drivers/scsi/pcmcia/qlogic_stub.c index f85f094870b4..c3a4428dbcff 100644 --- a/drivers/scsi/pcmcia/qlogic_stub.c +++ b/drivers/scsi/pcmcia/qlogic_stub.c | |||
@@ -161,7 +161,6 @@ static int qlogic_probe(struct pcmcia_device *link) | |||
161 | link->io.NumPorts1 = 16; | 161 | link->io.NumPorts1 = 16; |
162 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; | 162 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; |
163 | link->io.IOAddrLines = 10; | 163 | link->io.IOAddrLines = 10; |
164 | link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; | ||
165 | link->conf.Attributes = CONF_ENABLE_IRQ; | 164 | link->conf.Attributes = CONF_ENABLE_IRQ; |
166 | link->conf.IntType = INT_MEMORY_AND_IO; | 165 | link->conf.IntType = INT_MEMORY_AND_IO; |
167 | link->conf.Present = PRESENT_OPTION; | 166 | link->conf.Present = PRESENT_OPTION; |
@@ -209,8 +208,7 @@ static int qlogic_config(struct pcmcia_device * link) | |||
209 | if (ret) | 208 | if (ret) |
210 | goto failed; | 209 | goto failed; |
211 | 210 | ||
212 | ret = pcmcia_request_irq(link, &link->irq); | 211 | if (!link->irq) |
213 | if (ret) | ||
214 | goto failed; | 212 | goto failed; |
215 | 213 | ||
216 | ret = pcmcia_request_configuration(link, &link->conf); | 214 | ret = pcmcia_request_configuration(link, &link->conf); |
@@ -227,10 +225,10 @@ static int qlogic_config(struct pcmcia_device * link) | |||
227 | /* The KXL-810AN has a bigger IO port window */ | 225 | /* The KXL-810AN has a bigger IO port window */ |
228 | if (link->io.NumPorts1 == 32) | 226 | if (link->io.NumPorts1 == 32) |
229 | host = qlogic_detect(&qlogicfas_driver_template, link, | 227 | host = qlogic_detect(&qlogicfas_driver_template, link, |
230 | link->io.BasePort1 + 16, link->irq.AssignedIRQ); | 228 | link->io.BasePort1 + 16, link->irq); |
231 | else | 229 | else |
232 | host = qlogic_detect(&qlogicfas_driver_template, link, | 230 | host = qlogic_detect(&qlogicfas_driver_template, link, |
233 | link->io.BasePort1, link->irq.AssignedIRQ); | 231 | link->io.BasePort1, link->irq); |
234 | 232 | ||
235 | if (!host) { | 233 | if (!host) { |
236 | printk(KERN_INFO "%s: no SCSI devices found\n", qlogic_name); | 234 | printk(KERN_INFO "%s: no SCSI devices found\n", qlogic_name); |
@@ -258,7 +256,7 @@ static void qlogic_release(struct pcmcia_device *link) | |||
258 | 256 | ||
259 | scsi_remove_host(info->host); | 257 | scsi_remove_host(info->host); |
260 | 258 | ||
261 | free_irq(link->irq.AssignedIRQ, info->host); | 259 | free_irq(link->irq, info->host); |
262 | pcmcia_disable_device(link); | 260 | pcmcia_disable_device(link); |
263 | 261 | ||
264 | scsi_host_put(info->host); | 262 | scsi_host_put(info->host); |
diff --git a/drivers/scsi/pcmcia/sym53c500_cs.c b/drivers/scsi/pcmcia/sym53c500_cs.c index e7564d8f0cbf..6eacf4ca200f 100644 --- a/drivers/scsi/pcmcia/sym53c500_cs.c +++ b/drivers/scsi/pcmcia/sym53c500_cs.c | |||
@@ -719,8 +719,7 @@ SYM53C500_config(struct pcmcia_device *link) | |||
719 | if (ret) | 719 | if (ret) |
720 | goto failed; | 720 | goto failed; |
721 | 721 | ||
722 | ret = pcmcia_request_irq(link, &link->irq); | 722 | if (!link->irq) |
723 | if (ret) | ||
724 | goto failed; | 723 | goto failed; |
725 | 724 | ||
726 | ret = pcmcia_request_configuration(link, &link->conf); | 725 | ret = pcmcia_request_configuration(link, &link->conf); |
@@ -752,7 +751,7 @@ SYM53C500_config(struct pcmcia_device *link) | |||
752 | * 0x320, 0x330, 0x340, 0x350 | 751 | * 0x320, 0x330, 0x340, 0x350 |
753 | */ | 752 | */ |
754 | port_base = link->io.BasePort1; | 753 | port_base = link->io.BasePort1; |
755 | irq_level = link->irq.AssignedIRQ; | 754 | irq_level = link->irq; |
756 | 755 | ||
757 | DEB(printk("SYM53C500: port_base=0x%x, irq=%d, fast_pio=%d\n", | 756 | DEB(printk("SYM53C500: port_base=0x%x, irq=%d, fast_pio=%d\n", |
758 | port_base, irq_level, USE_FAST_PIO);) | 757 | port_base, irq_level, USE_FAST_PIO);) |
@@ -866,7 +865,6 @@ SYM53C500_probe(struct pcmcia_device *link) | |||
866 | link->io.NumPorts1 = 16; | 865 | link->io.NumPorts1 = 16; |
867 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; | 866 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; |
868 | link->io.IOAddrLines = 10; | 867 | link->io.IOAddrLines = 10; |
869 | link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; | ||
870 | link->conf.Attributes = CONF_ENABLE_IRQ; | 868 | link->conf.Attributes = CONF_ENABLE_IRQ; |
871 | link->conf.IntType = INT_MEMORY_AND_IO; | 869 | link->conf.IntType = INT_MEMORY_AND_IO; |
872 | 870 | ||
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c index 8cfa5b12ea7a..6459252ed371 100644 --- a/drivers/serial/serial_cs.c +++ b/drivers/serial/serial_cs.c | |||
@@ -343,7 +343,6 @@ static int serial_probe(struct pcmcia_device *link) | |||
343 | 343 | ||
344 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 344 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; |
345 | link->io.NumPorts1 = 8; | 345 | link->io.NumPorts1 = 8; |
346 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
347 | link->conf.Attributes = CONF_ENABLE_IRQ; | 346 | link->conf.Attributes = CONF_ENABLE_IRQ; |
348 | if (do_sound) { | 347 | if (do_sound) { |
349 | link->conf.Attributes |= CONF_ENABLE_SPKR; | 348 | link->conf.Attributes |= CONF_ENABLE_SPKR; |
@@ -486,7 +485,7 @@ static int simple_config(struct pcmcia_device *link) | |||
486 | } | 485 | } |
487 | if (info->slave) { | 486 | if (info->slave) { |
488 | return setup_serial(link, info, port, | 487 | return setup_serial(link, info, port, |
489 | link->irq.AssignedIRQ); | 488 | link->irq); |
490 | } | 489 | } |
491 | } | 490 | } |
492 | 491 | ||
@@ -507,10 +506,6 @@ static int simple_config(struct pcmcia_device *link) | |||
507 | return -1; | 506 | return -1; |
508 | 507 | ||
509 | found_port: | 508 | found_port: |
510 | i = pcmcia_request_irq(link, &link->irq); | ||
511 | if (i != 0) | ||
512 | link->irq.AssignedIRQ = 0; | ||
513 | |||
514 | if (info->multi && (info->manfid == MANFID_3COM)) | 509 | if (info->multi && (info->manfid == MANFID_3COM)) |
515 | link->conf.ConfigIndex &= ~(0x08); | 510 | link->conf.ConfigIndex &= ~(0x08); |
516 | 511 | ||
@@ -523,7 +518,7 @@ found_port: | |||
523 | i = pcmcia_request_configuration(link, &link->conf); | 518 | i = pcmcia_request_configuration(link, &link->conf); |
524 | if (i != 0) | 519 | if (i != 0) |
525 | return -1; | 520 | return -1; |
526 | return setup_serial(link, info, link->io.BasePort1, link->irq.AssignedIRQ); | 521 | return setup_serial(link, info, link->io.BasePort1, link->irq); |
527 | } | 522 | } |
528 | 523 | ||
529 | static int multi_config_check(struct pcmcia_device *p_dev, | 524 | static int multi_config_check(struct pcmcia_device *p_dev, |
@@ -586,13 +581,9 @@ static int multi_config(struct pcmcia_device *link) | |||
586 | } | 581 | } |
587 | } | 582 | } |
588 | 583 | ||
589 | i = pcmcia_request_irq(link, &link->irq); | 584 | if (!link->irq) |
590 | if (i != 0) { | 585 | dev_warn(&link->dev, |
591 | /* FIXME: comment does not fit, error handling does not fit */ | 586 | "serial_cs: no usable IRQ found, continuing...\n"); |
592 | printk(KERN_NOTICE | ||
593 | "serial_cs: no usable port range found, giving up\n"); | ||
594 | link->irq.AssignedIRQ = 0; | ||
595 | } | ||
596 | 587 | ||
597 | /* | 588 | /* |
598 | * Apply any configuration quirks. | 589 | * Apply any configuration quirks. |
@@ -615,11 +606,11 @@ static int multi_config(struct pcmcia_device *link) | |||
615 | if (link->conf.ConfigIndex == 1 || | 606 | if (link->conf.ConfigIndex == 1 || |
616 | link->conf.ConfigIndex == 3) { | 607 | link->conf.ConfigIndex == 3) { |
617 | err = setup_serial(link, info, base2, | 608 | err = setup_serial(link, info, base2, |
618 | link->irq.AssignedIRQ); | 609 | link->irq); |
619 | base2 = link->io.BasePort1; | 610 | base2 = link->io.BasePort1; |
620 | } else { | 611 | } else { |
621 | err = setup_serial(link, info, link->io.BasePort1, | 612 | err = setup_serial(link, info, link->io.BasePort1, |
622 | link->irq.AssignedIRQ); | 613 | link->irq); |
623 | } | 614 | } |
624 | info->c950ctrl = base2; | 615 | info->c950ctrl = base2; |
625 | 616 | ||
@@ -633,10 +624,10 @@ static int multi_config(struct pcmcia_device *link) | |||
633 | return 0; | 624 | return 0; |
634 | } | 625 | } |
635 | 626 | ||
636 | setup_serial(link, info, link->io.BasePort1, link->irq.AssignedIRQ); | 627 | setup_serial(link, info, link->io.BasePort1, link->irq); |
637 | for (i = 0; i < info->multi - 1; i++) | 628 | for (i = 0; i < info->multi - 1; i++) |
638 | setup_serial(link, info, base2 + (8 * i), | 629 | setup_serial(link, info, base2 + (8 * i), |
639 | link->irq.AssignedIRQ); | 630 | link->irq); |
640 | return 0; | 631 | return 0; |
641 | } | 632 | } |
642 | 633 | ||
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c index 80ff7d9e60de..bc9bdb277bec 100644 --- a/drivers/ssb/main.c +++ b/drivers/ssb/main.c | |||
@@ -490,7 +490,7 @@ static int ssb_devices_register(struct ssb_bus *bus) | |||
490 | break; | 490 | break; |
491 | case SSB_BUSTYPE_PCMCIA: | 491 | case SSB_BUSTYPE_PCMCIA: |
492 | #ifdef CONFIG_SSB_PCMCIAHOST | 492 | #ifdef CONFIG_SSB_PCMCIAHOST |
493 | sdev->irq = bus->host_pcmcia->irq.AssignedIRQ; | 493 | sdev->irq = bus->host_pcmcia->irq; |
494 | dev->parent = &bus->host_pcmcia->dev; | 494 | dev->parent = &bus->host_pcmcia->dev; |
495 | #endif | 495 | #endif |
496 | break; | 496 | break; |
diff --git a/drivers/staging/comedi/drivers/cb_das16_cs.c b/drivers/staging/comedi/drivers/cb_das16_cs.c index 5632991760af..e0352c6cf82d 100644 --- a/drivers/staging/comedi/drivers/cb_das16_cs.c +++ b/drivers/staging/comedi/drivers/cb_das16_cs.c | |||
@@ -180,12 +180,12 @@ static int das16cs_attach(struct comedi_device *dev, | |||
180 | } | 180 | } |
181 | printk("\n"); | 181 | printk("\n"); |
182 | 182 | ||
183 | ret = request_irq(link->irq.AssignedIRQ, das16cs_interrupt, | 183 | ret = request_irq(link->irq, das16cs_interrupt, |
184 | IRQF_SHARED, "cb_das16_cs", dev); | 184 | IRQF_SHARED, "cb_das16_cs", dev); |
185 | if (ret < 0) { | 185 | if (ret < 0) { |
186 | return ret; | 186 | return ret; |
187 | } | 187 | } |
188 | dev->irq = link->irq.AssignedIRQ; | 188 | dev->irq = link->irq; |
189 | printk("irq=%u ", dev->irq); | 189 | printk("irq=%u ", dev->irq); |
190 | 190 | ||
191 | dev->board_ptr = das16cs_probe(dev, link); | 191 | dev->board_ptr = das16cs_probe(dev, link); |
@@ -702,10 +702,6 @@ static int das16cs_pcmcia_attach(struct pcmcia_device *link) | |||
702 | link->priv = local; | 702 | link->priv = local; |
703 | 703 | ||
704 | /* Initialize the pcmcia_device structure */ | 704 | /* Initialize the pcmcia_device structure */ |
705 | /* Interrupt setup */ | ||
706 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
707 | link->irq.Handler = NULL; | ||
708 | |||
709 | link->conf.Attributes = 0; | 705 | link->conf.Attributes = 0; |
710 | link->conf.IntType = INT_MEMORY_AND_IO; | 706 | link->conf.IntType = INT_MEMORY_AND_IO; |
711 | 707 | ||
@@ -740,8 +736,7 @@ static int das16cs_pcmcia_config_loop(struct pcmcia_device *p_dev, | |||
740 | return -EINVAL; | 736 | return -EINVAL; |
741 | 737 | ||
742 | /* Do we need to allocate an interrupt? */ | 738 | /* Do we need to allocate an interrupt? */ |
743 | if (cfg->irq.IRQInfo1 || dflt->irq.IRQInfo1) | 739 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; |
744 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; | ||
745 | 740 | ||
746 | /* IO window settings */ | 741 | /* IO window settings */ |
747 | p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; | 742 | p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; |
@@ -780,16 +775,9 @@ static void das16cs_pcmcia_config(struct pcmcia_device *link) | |||
780 | goto failed; | 775 | goto failed; |
781 | } | 776 | } |
782 | 777 | ||
783 | /* | 778 | if (!link->irq) |
784 | Allocate an interrupt line. Note that this does not assign a | 779 | goto failed; |
785 | handler to the interrupt, unless the 'Handler' member of the | 780 | |
786 | irq structure is initialized. | ||
787 | */ | ||
788 | if (link->conf.Attributes & CONF_ENABLE_IRQ) { | ||
789 | ret = pcmcia_request_irq(link, &link->irq); | ||
790 | if (ret) | ||
791 | goto failed; | ||
792 | } | ||
793 | /* | 781 | /* |
794 | This actually configures the PCMCIA socket -- setting up | 782 | This actually configures the PCMCIA socket -- setting up |
795 | the I/O windows and the interrupt mapping, and putting the | 783 | the I/O windows and the interrupt mapping, and putting the |
@@ -811,7 +799,7 @@ static void das16cs_pcmcia_config(struct pcmcia_device *link) | |||
811 | printk(KERN_INFO "%s: index 0x%02x", | 799 | printk(KERN_INFO "%s: index 0x%02x", |
812 | dev->node.dev_name, link->conf.ConfigIndex); | 800 | dev->node.dev_name, link->conf.ConfigIndex); |
813 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 801 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
814 | printk(", irq %u", link->irq.AssignedIRQ); | 802 | printk(", irq %u", link->irq); |
815 | if (link->io.NumPorts1) | 803 | if (link->io.NumPorts1) |
816 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 804 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, |
817 | link->io.BasePort1 + link->io.NumPorts1 - 1); | 805 | link->io.BasePort1 + link->io.NumPorts1 - 1); |
diff --git a/drivers/staging/comedi/drivers/das08_cs.c b/drivers/staging/comedi/drivers/das08_cs.c index 9164ce158dcd..bd69c4fdcbf5 100644 --- a/drivers/staging/comedi/drivers/das08_cs.c +++ b/drivers/staging/comedi/drivers/das08_cs.c | |||
@@ -172,10 +172,6 @@ static int das08_pcmcia_attach(struct pcmcia_device *link) | |||
172 | local->link = link; | 172 | local->link = link; |
173 | link->priv = local; | 173 | link->priv = local; |
174 | 174 | ||
175 | /* Interrupt setup */ | ||
176 | link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; | ||
177 | link->irq.Handler = NULL; | ||
178 | |||
179 | /* | 175 | /* |
180 | General socket configuration defaults can go here. In this | 176 | General socket configuration defaults can go here. In this |
181 | client, we assume very little, and rely on the CIS for almost | 177 | client, we assume very little, and rely on the CIS for almost |
@@ -229,8 +225,7 @@ static int das08_pcmcia_config_loop(struct pcmcia_device *p_dev, | |||
229 | return -ENODEV; | 225 | return -ENODEV; |
230 | 226 | ||
231 | /* Do we need to allocate an interrupt? */ | 227 | /* Do we need to allocate an interrupt? */ |
232 | if (cfg->irq.IRQInfo1 || dflt->irq.IRQInfo1) | 228 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; |
233 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; | ||
234 | 229 | ||
235 | /* IO window settings */ | 230 | /* IO window settings */ |
236 | p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; | 231 | p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; |
@@ -277,11 +272,8 @@ static void das08_pcmcia_config(struct pcmcia_device *link) | |||
277 | goto failed; | 272 | goto failed; |
278 | } | 273 | } |
279 | 274 | ||
280 | if (link->conf.Attributes & CONF_ENABLE_IRQ) { | 275 | if (!link->irq) |
281 | ret = pcmcia_request_irq(link, &link->irq); | 276 | goto failed; |
282 | if (ret) | ||
283 | goto failed; | ||
284 | } | ||
285 | 277 | ||
286 | /* | 278 | /* |
287 | This actually configures the PCMCIA socket -- setting up | 279 | This actually configures the PCMCIA socket -- setting up |
@@ -304,7 +296,7 @@ static void das08_pcmcia_config(struct pcmcia_device *link) | |||
304 | printk(KERN_INFO "%s: index 0x%02x", | 296 | printk(KERN_INFO "%s: index 0x%02x", |
305 | dev->node.dev_name, link->conf.ConfigIndex); | 297 | dev->node.dev_name, link->conf.ConfigIndex); |
306 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 298 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
307 | printk(", irq %u", link->irq.AssignedIRQ); | 299 | printk(", irq %u", link->irq); |
308 | if (link->io.NumPorts1) | 300 | if (link->io.NumPorts1) |
309 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 301 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, |
310 | link->io.BasePort1 + link->io.NumPorts1 - 1); | 302 | link->io.BasePort1 + link->io.NumPorts1 - 1); |
diff --git a/drivers/staging/comedi/drivers/ni_daq_700.c b/drivers/staging/comedi/drivers/ni_daq_700.c index 7ea64538e055..072bc4b62011 100644 --- a/drivers/staging/comedi/drivers/ni_daq_700.c +++ b/drivers/staging/comedi/drivers/ni_daq_700.c | |||
@@ -380,7 +380,7 @@ static int dio700_attach(struct comedi_device *dev, struct comedi_devconfig *it) | |||
380 | return -EIO; | 380 | return -EIO; |
381 | iobase = link->io.BasePort1; | 381 | iobase = link->io.BasePort1; |
382 | #ifdef incomplete | 382 | #ifdef incomplete |
383 | irq = link->irq.AssignedIRQ; | 383 | irq = link->irq; |
384 | #endif | 384 | #endif |
385 | break; | 385 | break; |
386 | default: | 386 | default: |
@@ -502,10 +502,6 @@ static int dio700_cs_attach(struct pcmcia_device *link) | |||
502 | local->link = link; | 502 | local->link = link; |
503 | link->priv = local; | 503 | link->priv = local; |
504 | 504 | ||
505 | /* Interrupt setup */ | ||
506 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
507 | link->irq.Handler = NULL; | ||
508 | |||
509 | /* | 505 | /* |
510 | General socket configuration defaults can go here. In this | 506 | General socket configuration defaults can go here. In this |
511 | client, we assume very little, and rely on the CIS for almost | 507 | client, we assume very little, and rely on the CIS for almost |
@@ -577,8 +573,7 @@ static int dio700_pcmcia_config_loop(struct pcmcia_device *p_dev, | |||
577 | } | 573 | } |
578 | 574 | ||
579 | /* Do we need to allocate an interrupt? */ | 575 | /* Do we need to allocate an interrupt? */ |
580 | if (cfg->irq.IRQInfo1 || dflt->irq.IRQInfo1) | 576 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; |
581 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; | ||
582 | 577 | ||
583 | /* IO window settings */ | 578 | /* IO window settings */ |
584 | p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; | 579 | p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; |
@@ -639,16 +634,8 @@ static void dio700_config(struct pcmcia_device *link) | |||
639 | goto failed; | 634 | goto failed; |
640 | } | 635 | } |
641 | 636 | ||
642 | /* | 637 | if (!link->irq) |
643 | Allocate an interrupt line. Note that this does not assign a | 638 | goto failed; |
644 | handler to the interrupt, unless the 'Handler' member of the | ||
645 | irq structure is initialized. | ||
646 | */ | ||
647 | if (link->conf.Attributes & CONF_ENABLE_IRQ) { | ||
648 | ret = pcmcia_request_irq(link, &link->irq); | ||
649 | if (ret) | ||
650 | goto failed; | ||
651 | } | ||
652 | 639 | ||
653 | /* | 640 | /* |
654 | This actually configures the PCMCIA socket -- setting up | 641 | This actually configures the PCMCIA socket -- setting up |
@@ -671,7 +658,7 @@ static void dio700_config(struct pcmcia_device *link) | |||
671 | printk(KERN_INFO "%s: index 0x%02x", | 658 | printk(KERN_INFO "%s: index 0x%02x", |
672 | dev->node.dev_name, link->conf.ConfigIndex); | 659 | dev->node.dev_name, link->conf.ConfigIndex); |
673 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 660 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
674 | printk(", irq %d", link->irq.AssignedIRQ); | 661 | printk(", irq %d", link->irq); |
675 | if (link->io.NumPorts1) | 662 | if (link->io.NumPorts1) |
676 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 663 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, |
677 | link->io.BasePort1 + link->io.NumPorts1 - 1); | 664 | link->io.BasePort1 + link->io.NumPorts1 - 1); |
diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c b/drivers/staging/comedi/drivers/ni_daq_dio24.c index ddc312b5d20d..2259fb40608b 100644 --- a/drivers/staging/comedi/drivers/ni_daq_dio24.c +++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c | |||
@@ -131,7 +131,7 @@ static int dio24_attach(struct comedi_device *dev, struct comedi_devconfig *it) | |||
131 | return -EIO; | 131 | return -EIO; |
132 | iobase = link->io.BasePort1; | 132 | iobase = link->io.BasePort1; |
133 | #ifdef incomplete | 133 | #ifdef incomplete |
134 | irq = link->irq.AssignedIRQ; | 134 | irq = link->irq; |
135 | #endif | 135 | #endif |
136 | break; | 136 | break; |
137 | default: | 137 | default: |
@@ -253,10 +253,6 @@ static int dio24_cs_attach(struct pcmcia_device *link) | |||
253 | local->link = link; | 253 | local->link = link; |
254 | link->priv = local; | 254 | link->priv = local; |
255 | 255 | ||
256 | /* Interrupt setup */ | ||
257 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
258 | link->irq.Handler = NULL; | ||
259 | |||
260 | /* | 256 | /* |
261 | General socket configuration defaults can go here. In this | 257 | General socket configuration defaults can go here. In this |
262 | client, we assume very little, and rely on the CIS for almost | 258 | client, we assume very little, and rely on the CIS for almost |
@@ -328,8 +324,7 @@ static int dio24_pcmcia_config_loop(struct pcmcia_device *p_dev, | |||
328 | } | 324 | } |
329 | 325 | ||
330 | /* Do we need to allocate an interrupt? */ | 326 | /* Do we need to allocate an interrupt? */ |
331 | if (cfg->irq.IRQInfo1 || dflt->irq.IRQInfo1) | 327 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; |
332 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; | ||
333 | 328 | ||
334 | /* IO window settings */ | 329 | /* IO window settings */ |
335 | p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; | 330 | p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; |
@@ -390,16 +385,8 @@ static void dio24_config(struct pcmcia_device *link) | |||
390 | goto failed; | 385 | goto failed; |
391 | } | 386 | } |
392 | 387 | ||
393 | /* | 388 | if (!link->irq) |
394 | Allocate an interrupt line. Note that this does not assign a | 389 | goto failed; |
395 | handler to the interrupt, unless the 'Handler' member of the | ||
396 | irq structure is initialized. | ||
397 | */ | ||
398 | if (link->conf.Attributes & CONF_ENABLE_IRQ) { | ||
399 | ret = pcmcia_request_irq(link, &link->irq); | ||
400 | if (ret) | ||
401 | goto failed; | ||
402 | } | ||
403 | 390 | ||
404 | /* | 391 | /* |
405 | This actually configures the PCMCIA socket -- setting up | 392 | This actually configures the PCMCIA socket -- setting up |
@@ -422,7 +409,7 @@ static void dio24_config(struct pcmcia_device *link) | |||
422 | printk(KERN_INFO "%s: index 0x%02x", | 409 | printk(KERN_INFO "%s: index 0x%02x", |
423 | dev->node.dev_name, link->conf.ConfigIndex); | 410 | dev->node.dev_name, link->conf.ConfigIndex); |
424 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 411 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
425 | printk(", irq %d", link->irq.AssignedIRQ); | 412 | printk(", irq %d", link->irq); |
426 | if (link->io.NumPorts1) | 413 | if (link->io.NumPorts1) |
427 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 414 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, |
428 | link->io.BasePort1 + link->io.NumPorts1 - 1); | 415 | link->io.BasePort1 + link->io.NumPorts1 - 1); |
diff --git a/drivers/staging/comedi/drivers/ni_labpc_cs.c b/drivers/staging/comedi/drivers/ni_labpc_cs.c index 6e4ed0d9105a..907b2ae467b2 100644 --- a/drivers/staging/comedi/drivers/ni_labpc_cs.c +++ b/drivers/staging/comedi/drivers/ni_labpc_cs.c | |||
@@ -144,7 +144,7 @@ static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it) | |||
144 | if (!link) | 144 | if (!link) |
145 | return -EIO; | 145 | return -EIO; |
146 | iobase = link->io.BasePort1; | 146 | iobase = link->io.BasePort1; |
147 | irq = link->irq.AssignedIRQ; | 147 | irq = link->irq; |
148 | break; | 148 | break; |
149 | default: | 149 | default: |
150 | printk("bug! couldn't determine board type\n"); | 150 | printk("bug! couldn't determine board type\n"); |
@@ -229,10 +229,6 @@ static int labpc_cs_attach(struct pcmcia_device *link) | |||
229 | local->link = link; | 229 | local->link = link; |
230 | link->priv = local; | 230 | link->priv = local; |
231 | 231 | ||
232 | /* Interrupt setup */ | ||
233 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
234 | link->irq.Handler = NULL; | ||
235 | |||
236 | /* | 232 | /* |
237 | General socket configuration defaults can go here. In this | 233 | General socket configuration defaults can go here. In this |
238 | client, we assume very little, and rely on the CIS for almost | 234 | client, we assume very little, and rely on the CIS for almost |
@@ -306,9 +302,7 @@ static int labpc_pcmcia_config_loop(struct pcmcia_device *p_dev, | |||
306 | } | 302 | } |
307 | 303 | ||
308 | /* Do we need to allocate an interrupt? */ | 304 | /* Do we need to allocate an interrupt? */ |
309 | if (cfg->irq.IRQInfo1 || dflt->irq.IRQInfo1) | 305 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ; |
310 | p_dev->conf.Attributes |= | ||
311 | (CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ); | ||
312 | 306 | ||
313 | /* IO window settings */ | 307 | /* IO window settings */ |
314 | p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; | 308 | p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; |
@@ -368,16 +362,8 @@ static void labpc_config(struct pcmcia_device *link) | |||
368 | goto failed; | 362 | goto failed; |
369 | } | 363 | } |
370 | 364 | ||
371 | /* | 365 | if (!link->irq) |
372 | Allocate an interrupt line. Note that this does not assign a | 366 | goto failed; |
373 | handler to the interrupt, unless the 'Handler' member of the | ||
374 | irq structure is initialized. | ||
375 | */ | ||
376 | if (link->conf.Attributes & CONF_ENABLE_IRQ) { | ||
377 | ret = pcmcia_request_irq(link, &link->irq); | ||
378 | if (ret) | ||
379 | goto failed; | ||
380 | } | ||
381 | 367 | ||
382 | /* | 368 | /* |
383 | This actually configures the PCMCIA socket -- setting up | 369 | This actually configures the PCMCIA socket -- setting up |
@@ -400,7 +386,7 @@ static void labpc_config(struct pcmcia_device *link) | |||
400 | printk(KERN_INFO "%s: index 0x%02x", | 386 | printk(KERN_INFO "%s: index 0x%02x", |
401 | dev->node.dev_name, link->conf.ConfigIndex); | 387 | dev->node.dev_name, link->conf.ConfigIndex); |
402 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 388 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
403 | printk(", irq %d", link->irq.AssignedIRQ); | 389 | printk(", irq %d", link->irq); |
404 | if (link->io.NumPorts1) | 390 | if (link->io.NumPorts1) |
405 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 391 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, |
406 | link->io.BasePort1 + link->io.NumPorts1 - 1); | 392 | link->io.BasePort1 + link->io.NumPorts1 - 1); |
diff --git a/drivers/staging/comedi/drivers/ni_mio_cs.c b/drivers/staging/comedi/drivers/ni_mio_cs.c index dc4849a40c97..a6007abce34a 100644 --- a/drivers/staging/comedi/drivers/ni_mio_cs.c +++ b/drivers/staging/comedi/drivers/ni_mio_cs.c | |||
@@ -272,7 +272,6 @@ static int cs_attach(struct pcmcia_device *link) | |||
272 | { | 272 | { |
273 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_16; | 273 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_16; |
274 | link->io.NumPorts1 = 16; | 274 | link->io.NumPorts1 = 16; |
275 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
276 | link->conf.Attributes = CONF_ENABLE_IRQ; | 275 | link->conf.Attributes = CONF_ENABLE_IRQ; |
277 | link->conf.IntType = INT_MEMORY_AND_IO; | 276 | link->conf.IntType = INT_MEMORY_AND_IO; |
278 | 277 | ||
@@ -344,10 +343,8 @@ static void mio_cs_config(struct pcmcia_device *link) | |||
344 | return; | 343 | return; |
345 | } | 344 | } |
346 | 345 | ||
347 | ret = pcmcia_request_irq(link, &link->irq); | 346 | if (!link->irq) |
348 | if (ret) { | 347 | dev_info(&link->dev, "no IRQ available\n"); |
349 | printk("pcmcia_request_irq() returned error: %i\n", ret); | ||
350 | } | ||
351 | 348 | ||
352 | ret = pcmcia_request_configuration(link, &link->conf); | 349 | ret = pcmcia_request_configuration(link, &link->conf); |
353 | 350 | ||
@@ -369,7 +366,7 @@ static int mio_cs_attach(struct comedi_device *dev, struct comedi_devconfig *it) | |||
369 | dev->driver = &driver_ni_mio_cs; | 366 | dev->driver = &driver_ni_mio_cs; |
370 | dev->iobase = link->io.BasePort1; | 367 | dev->iobase = link->io.BasePort1; |
371 | 368 | ||
372 | irq = link->irq.AssignedIRQ; | 369 | irq = link->irq; |
373 | 370 | ||
374 | printk("comedi%d: %s: DAQCard: io 0x%04lx, irq %u, ", | 371 | printk("comedi%d: %s: DAQCard: io 0x%04lx, irq %u, ", |
375 | dev->minor, dev->driver->driver_name, dev->iobase, irq); | 372 | dev->minor, dev->driver->driver_name, dev->iobase, irq); |
diff --git a/drivers/staging/comedi/drivers/quatech_daqp_cs.c b/drivers/staging/comedi/drivers/quatech_daqp_cs.c index 3325f24448b5..7aa17f92968c 100644 --- a/drivers/staging/comedi/drivers/quatech_daqp_cs.c +++ b/drivers/staging/comedi/drivers/quatech_daqp_cs.c | |||
@@ -1040,10 +1040,6 @@ static int daqp_cs_attach(struct pcmcia_device *link) | |||
1040 | local->link = link; | 1040 | local->link = link; |
1041 | link->priv = local; | 1041 | link->priv = local; |
1042 | 1042 | ||
1043 | /* Interrupt setup */ | ||
1044 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
1045 | link->irq.Handler = daqp_interrupt; | ||
1046 | |||
1047 | /* | 1043 | /* |
1048 | General socket configuration defaults can go here. In this | 1044 | General socket configuration defaults can go here. In this |
1049 | client, we assume very little, and rely on the CIS for almost | 1045 | client, we assume very little, and rely on the CIS for almost |
@@ -1105,8 +1101,7 @@ static int daqp_pcmcia_config_loop(struct pcmcia_device *p_dev, | |||
1105 | return -ENODEV; | 1101 | return -ENODEV; |
1106 | 1102 | ||
1107 | /* Do we need to allocate an interrupt? */ | 1103 | /* Do we need to allocate an interrupt? */ |
1108 | if (cfg->irq.IRQInfo1 || dflt->irq.IRQInfo1) | 1104 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; |
1109 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; | ||
1110 | 1105 | ||
1111 | /* IO window settings */ | 1106 | /* IO window settings */ |
1112 | p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; | 1107 | p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; |
@@ -1144,16 +1139,9 @@ static void daqp_cs_config(struct pcmcia_device *link) | |||
1144 | goto failed; | 1139 | goto failed; |
1145 | } | 1140 | } |
1146 | 1141 | ||
1147 | /* | 1142 | ret = pcmcia_request_irq(link, daqp_interrupt); |
1148 | Allocate an interrupt line. Note that this does not assign a | 1143 | if (ret) |
1149 | handler to the interrupt, unless the 'Handler' member of the | 1144 | goto failed; |
1150 | irq structure is initialized. | ||
1151 | */ | ||
1152 | if (link->conf.Attributes & CONF_ENABLE_IRQ) { | ||
1153 | ret = pcmcia_request_irq(link, &link->irq); | ||
1154 | if (ret) | ||
1155 | goto failed; | ||
1156 | } | ||
1157 | 1145 | ||
1158 | /* | 1146 | /* |
1159 | This actually configures the PCMCIA socket -- setting up | 1147 | This actually configures the PCMCIA socket -- setting up |
@@ -1180,7 +1168,7 @@ static void daqp_cs_config(struct pcmcia_device *link) | |||
1180 | printk(KERN_INFO "%s: index 0x%02x", | 1168 | printk(KERN_INFO "%s: index 0x%02x", |
1181 | dev->node.dev_name, link->conf.ConfigIndex); | 1169 | dev->node.dev_name, link->conf.ConfigIndex); |
1182 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 1170 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
1183 | printk(", irq %u", link->irq.AssignedIRQ); | 1171 | printk(", irq %u", link->irq); |
1184 | if (link->io.NumPorts1) | 1172 | if (link->io.NumPorts1) |
1185 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 1173 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, |
1186 | link->io.BasePort1 + link->io.NumPorts1 - 1); | 1174 | link->io.BasePort1 + link->io.NumPorts1 - 1); |
diff --git a/drivers/staging/netwave/netwave_cs.c b/drivers/staging/netwave/netwave_cs.c index 3875a722d12b..449e6a5c19e1 100644 --- a/drivers/staging/netwave/netwave_cs.c +++ b/drivers/staging/netwave/netwave_cs.c | |||
@@ -382,10 +382,6 @@ static int netwave_probe(struct pcmcia_device *link) | |||
382 | link->io.Attributes2 = IO_DATA_PATH_WIDTH_16; */ | 382 | link->io.Attributes2 = IO_DATA_PATH_WIDTH_16; */ |
383 | link->io.IOAddrLines = 5; | 383 | link->io.IOAddrLines = 5; |
384 | 384 | ||
385 | /* Interrupt setup */ | ||
386 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
387 | link->irq.Handler = &netwave_interrupt; | ||
388 | |||
389 | /* General socket configuration */ | 385 | /* General socket configuration */ |
390 | link->conf.Attributes = CONF_ENABLE_IRQ; | 386 | link->conf.Attributes = CONF_ENABLE_IRQ; |
391 | link->conf.IntType = INT_MEMORY_AND_IO; | 387 | link->conf.IntType = INT_MEMORY_AND_IO; |
@@ -732,7 +728,7 @@ static int netwave_pcmcia_config(struct pcmcia_device *link) { | |||
732 | * Now allocate an interrupt line. Note that this does not | 728 | * Now allocate an interrupt line. Note that this does not |
733 | * actually assign a handler to the interrupt. | 729 | * actually assign a handler to the interrupt. |
734 | */ | 730 | */ |
735 | ret = pcmcia_request_irq(link, &link->irq); | 731 | ret = pcmcia_request_irq(link, netwave_interrupt); |
736 | if (ret) | 732 | if (ret) |
737 | goto failed; | 733 | goto failed; |
738 | 734 | ||
@@ -767,7 +763,7 @@ static int netwave_pcmcia_config(struct pcmcia_device *link) { | |||
767 | ramBase = ioremap(req.Base, 0x8000); | 763 | ramBase = ioremap(req.Base, 0x8000); |
768 | priv->ramBase = ramBase; | 764 | priv->ramBase = ramBase; |
769 | 765 | ||
770 | dev->irq = link->irq.AssignedIRQ; | 766 | dev->irq = link->irq; |
771 | dev->base_addr = link->io.BasePort1; | 767 | dev->base_addr = link->io.BasePort1; |
772 | SET_NETDEV_DEV(dev, &link->dev); | 768 | SET_NETDEV_DEV(dev, &link->dev); |
773 | 769 | ||
diff --git a/drivers/staging/wavelan/wavelan_cs.c b/drivers/staging/wavelan/wavelan_cs.c index 04f691d127b4..37fa85517a58 100644 --- a/drivers/staging/wavelan/wavelan_cs.c +++ b/drivers/staging/wavelan/wavelan_cs.c | |||
@@ -3850,12 +3850,8 @@ wv_pcmcia_config(struct pcmcia_device * link) | |||
3850 | if (i != 0) | 3850 | if (i != 0) |
3851 | break; | 3851 | break; |
3852 | 3852 | ||
3853 | /* | 3853 | i = pcmcia_request_interrupt(link, wavelan_interrupt); |
3854 | * Now allocate an interrupt line. Note that this does not | 3854 | if (!i) |
3855 | * actually assign a handler to the interrupt. | ||
3856 | */ | ||
3857 | i = pcmcia_request_irq(link, &link->irq); | ||
3858 | if (i != 0) | ||
3859 | break; | 3855 | break; |
3860 | 3856 | ||
3861 | /* | 3857 | /* |
@@ -3890,7 +3886,7 @@ wv_pcmcia_config(struct pcmcia_device * link) | |||
3890 | break; | 3886 | break; |
3891 | 3887 | ||
3892 | /* Feed device with this info... */ | 3888 | /* Feed device with this info... */ |
3893 | dev->irq = link->irq.AssignedIRQ; | 3889 | dev->irq = link->irq; |
3894 | dev->base_addr = link->io.BasePort1; | 3890 | dev->base_addr = link->io.BasePort1; |
3895 | netif_start_queue(dev); | 3891 | netif_start_queue(dev); |
3896 | 3892 | ||
@@ -4437,10 +4433,6 @@ wavelan_probe(struct pcmcia_device *p_dev) | |||
4437 | p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 4433 | p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8; |
4438 | p_dev->io.IOAddrLines = 3; | 4434 | p_dev->io.IOAddrLines = 3; |
4439 | 4435 | ||
4440 | /* Interrupt setup */ | ||
4441 | p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
4442 | p_dev->irq.Handler = wavelan_interrupt; | ||
4443 | |||
4444 | /* General socket configuration */ | 4436 | /* General socket configuration */ |
4445 | p_dev->conf.Attributes = CONF_ENABLE_IRQ; | 4437 | p_dev->conf.Attributes = CONF_ENABLE_IRQ; |
4446 | p_dev->conf.IntType = INT_MEMORY_AND_IO; | 4438 | p_dev->conf.IntType = INT_MEMORY_AND_IO; |
@@ -4487,7 +4479,6 @@ wavelan_probe(struct pcmcia_device *p_dev) | |||
4487 | 4479 | ||
4488 | ret = wv_hw_config(dev); | 4480 | ret = wv_hw_config(dev); |
4489 | if (ret) { | 4481 | if (ret) { |
4490 | dev->irq = 0; | ||
4491 | pcmcia_disable_device(p_dev); | 4482 | pcmcia_disable_device(p_dev); |
4492 | return ret; | 4483 | return ret; |
4493 | } | 4484 | } |
diff --git a/drivers/staging/wlags49_h2/wl_cs.c b/drivers/staging/wlags49_h2/wl_cs.c index 9da42e66085e..c9d99d88b786 100644 --- a/drivers/staging/wlags49_h2/wl_cs.c +++ b/drivers/staging/wlags49_h2/wl_cs.c | |||
@@ -156,15 +156,12 @@ static int wl_adapter_attach(struct pcmcia_device *link) | |||
156 | link->io.NumPorts1 = HCF_NUM_IO_PORTS; | 156 | link->io.NumPorts1 = HCF_NUM_IO_PORTS; |
157 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_16; | 157 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_16; |
158 | link->io.IOAddrLines = 6; | 158 | link->io.IOAddrLines = 6; |
159 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT; | ||
160 | link->irq.IRQInfo1 = IRQ_INFO2_VALID | IRQ_LEVEL_ID; | ||
161 | link->irq.Handler = &wl_isr; | ||
162 | link->conf.Attributes = CONF_ENABLE_IRQ; | 159 | link->conf.Attributes = CONF_ENABLE_IRQ; |
163 | link->conf.IntType = INT_MEMORY_AND_IO; | 160 | link->conf.IntType = INT_MEMORY_AND_IO; |
164 | link->conf.ConfigIndex = 5; | 161 | link->conf.ConfigIndex = 5; |
165 | link->conf.Present = PRESENT_OPTION; | 162 | link->conf.Present = PRESENT_OPTION; |
166 | 163 | ||
167 | link->priv = link->irq.Instance = dev; | 164 | link->priv = dev; |
168 | lp = wl_priv(dev); | 165 | lp = wl_priv(dev); |
169 | lp->link = link; | 166 | lp->link = link; |
170 | 167 | ||
@@ -318,11 +315,11 @@ void wl_adapter_insert( struct pcmcia_device *link ) | |||
318 | link->conf.Attributes |= CONF_ENABLE_IRQ; | 315 | link->conf.Attributes |= CONF_ENABLE_IRQ; |
319 | 316 | ||
320 | CS_CHECK(RequestIO, pcmcia_request_io(link, &link->io)); | 317 | CS_CHECK(RequestIO, pcmcia_request_io(link, &link->io)); |
321 | CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq)); | 318 | CS_CHECK(RequestIRQ, pcmcia_request_irq(link, wl_isr)); |
322 | CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf)); | 319 | CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf)); |
323 | 320 | ||
324 | 321 | ||
325 | dev->irq = link->irq.AssignedIRQ; | 322 | dev->irq = link->irq; |
326 | dev->base_addr = link->io.BasePort1; | 323 | dev->base_addr = link->io.BasePort1; |
327 | 324 | ||
328 | SET_NETDEV_DEV(dev, &handle_to_dev(link)); | 325 | SET_NETDEV_DEV(dev, &handle_to_dev(link)); |
diff --git a/drivers/usb/host/sl811_cs.c b/drivers/usb/host/sl811_cs.c index 39d253e841f6..a712788f9b10 100644 --- a/drivers/usb/host/sl811_cs.c +++ b/drivers/usb/host/sl811_cs.c | |||
@@ -163,8 +163,7 @@ static int sl811_cs_config_check(struct pcmcia_device *p_dev, | |||
163 | dflt->vpp1.param[CISTPL_POWER_VNOM]/10000; | 163 | dflt->vpp1.param[CISTPL_POWER_VNOM]/10000; |
164 | 164 | ||
165 | /* we need an interrupt */ | 165 | /* we need an interrupt */ |
166 | if (cfg->irq.IRQInfo1 || dflt->irq.IRQInfo1) | 166 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; |
167 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; | ||
168 | 167 | ||
169 | /* IO window settings */ | 168 | /* IO window settings */ |
170 | p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; | 169 | p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; |
@@ -197,11 +196,8 @@ static int sl811_cs_config(struct pcmcia_device *link) | |||
197 | /* require an IRQ and two registers */ | 196 | /* require an IRQ and two registers */ |
198 | if (!link->io.NumPorts1 || link->io.NumPorts1 < 2) | 197 | if (!link->io.NumPorts1 || link->io.NumPorts1 < 2) |
199 | goto failed; | 198 | goto failed; |
200 | if (link->conf.Attributes & CONF_ENABLE_IRQ) { | 199 | |
201 | ret = pcmcia_request_irq(link, &link->irq); | 200 | if (!link->irq) |
202 | if (ret) | ||
203 | goto failed; | ||
204 | } else | ||
205 | goto failed; | 201 | goto failed; |
206 | 202 | ||
207 | ret = pcmcia_request_configuration(link, &link->conf); | 203 | ret = pcmcia_request_configuration(link, &link->conf); |
@@ -216,12 +212,12 @@ static int sl811_cs_config(struct pcmcia_device *link) | |||
216 | dev->node.dev_name, link->conf.ConfigIndex); | 212 | dev->node.dev_name, link->conf.ConfigIndex); |
217 | if (link->conf.Vpp) | 213 | if (link->conf.Vpp) |
218 | printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10); | 214 | printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10); |
219 | printk(", irq %d", link->irq.AssignedIRQ); | 215 | printk(", irq %d", link->irq); |
220 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 216 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, |
221 | link->io.BasePort1+link->io.NumPorts1-1); | 217 | link->io.BasePort1+link->io.NumPorts1-1); |
222 | printk("\n"); | 218 | printk("\n"); |
223 | 219 | ||
224 | if (sl811_hc_init(parent, link->io.BasePort1, link->irq.AssignedIRQ) | 220 | if (sl811_hc_init(parent, link->io.BasePort1, link->irq) |
225 | < 0) { | 221 | < 0) { |
226 | failed: | 222 | failed: |
227 | printk(KERN_WARNING "sl811_cs_config failed\n"); | 223 | printk(KERN_WARNING "sl811_cs_config failed\n"); |
@@ -241,10 +237,6 @@ static int sl811_cs_probe(struct pcmcia_device *link) | |||
241 | local->p_dev = link; | 237 | local->p_dev = link; |
242 | link->priv = local; | 238 | link->priv = local; |
243 | 239 | ||
244 | /* Initialize */ | ||
245 | link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; | ||
246 | link->irq.Handler = NULL; | ||
247 | |||
248 | link->conf.Attributes = 0; | 240 | link->conf.Attributes = 0; |
249 | link->conf.IntType = INT_MEMORY_AND_IO; | 241 | link->conf.IntType = INT_MEMORY_AND_IO; |
250 | 242 | ||
diff --git a/include/pcmcia/cs.h b/include/pcmcia/cs.h index af615716dc23..a04e6caa585a 100644 --- a/include/pcmcia/cs.h +++ b/include/pcmcia/cs.h | |||
@@ -114,13 +114,6 @@ typedef struct io_req_t { | |||
114 | #define IO_DATA_PATH_WIDTH_16 0x08 | 114 | #define IO_DATA_PATH_WIDTH_16 0x08 |
115 | #define IO_DATA_PATH_WIDTH_AUTO 0x10 | 115 | #define IO_DATA_PATH_WIDTH_AUTO 0x10 |
116 | 116 | ||
117 | /* For RequestIRQ and ReleaseIRQ */ | ||
118 | typedef struct irq_req_t { | ||
119 | u_int Attributes; | ||
120 | u_int AssignedIRQ; | ||
121 | irq_handler_t Handler; | ||
122 | } irq_req_t; | ||
123 | |||
124 | /* Attributes for RequestIRQ and ReleaseIRQ */ | 117 | /* Attributes for RequestIRQ and ReleaseIRQ */ |
125 | #define IRQ_TYPE 0x03 | 118 | #define IRQ_TYPE 0x03 |
126 | #define IRQ_TYPE_EXCLUSIVE 0x00 | 119 | #define IRQ_TYPE_EXCLUSIVE 0x00 |
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h index 52ebe75664e8..d18330b401b1 100644 --- a/include/pcmcia/ds.h +++ b/include/pcmcia/ds.h | |||
@@ -91,12 +91,11 @@ struct pcmcia_device { | |||
91 | dev_node_t *dev_node; | 91 | dev_node_t *dev_node; |
92 | u_int open; | 92 | u_int open; |
93 | io_req_t io; | 93 | io_req_t io; |
94 | irq_req_t irq; | ||
95 | config_req_t conf; | 94 | config_req_t conf; |
96 | window_handle_t win; | 95 | window_handle_t win; |
97 | 96 | ||
98 | /* device setup */ | 97 | /* device setup */ |
99 | unsigned int irq_v; /* do not use directly yet */ | 98 | unsigned int irq; |
100 | 99 | ||
101 | /* Is the device suspended? */ | 100 | /* Is the device suspended? */ |
102 | u16 suspended:1; | 101 | u16 suspended:1; |
@@ -194,7 +193,13 @@ int pcmcia_access_configuration_register(struct pcmcia_device *p_dev, | |||
194 | 193 | ||
195 | /* device configuration */ | 194 | /* device configuration */ |
196 | int pcmcia_request_io(struct pcmcia_device *p_dev, io_req_t *req); | 195 | int pcmcia_request_io(struct pcmcia_device *p_dev, io_req_t *req); |
197 | int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req); | 196 | |
197 | int __must_check __deprecated | ||
198 | pcmcia_request_exclusive_irq(struct pcmcia_device *p_dev, | ||
199 | irq_handler_t handler); | ||
200 | int __must_check pcmcia_request_irq(struct pcmcia_device *p_dev, | ||
201 | irq_handler_t handler); | ||
202 | |||
198 | int pcmcia_request_configuration(struct pcmcia_device *p_dev, | 203 | int pcmcia_request_configuration(struct pcmcia_device *p_dev, |
199 | config_req_t *req); | 204 | config_req_t *req); |
200 | 205 | ||
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c index dcf85390c5f9..60fddf363d54 100644 --- a/sound/pcmcia/pdaudiocf/pdaudiocf.c +++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c | |||
@@ -142,11 +142,6 @@ static int snd_pdacf_probe(struct pcmcia_device *link) | |||
142 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; | 142 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; |
143 | link->io.NumPorts1 = 16; | 143 | link->io.NumPorts1 = 16; |
144 | 144 | ||
145 | link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; | ||
146 | /* FIXME: This driver should be updated to allow for dynamic IRQ sharing */ | ||
147 | /* link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; */ | ||
148 | |||
149 | link->irq.Handler = pdacf_interrupt; | ||
150 | link->conf.Attributes = CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ; | 145 | link->conf.Attributes = CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ; |
151 | link->conf.IntType = INT_MEMORY_AND_IO; | 146 | link->conf.IntType = INT_MEMORY_AND_IO; |
152 | link->conf.ConfigIndex = 1; | 147 | link->conf.ConfigIndex = 1; |
@@ -228,7 +223,7 @@ static int pdacf_config(struct pcmcia_device *link) | |||
228 | if (ret) | 223 | if (ret) |
229 | goto failed; | 224 | goto failed; |
230 | 225 | ||
231 | ret = pcmcia_request_irq(link, &link->irq); | 226 | ret = pcmcia_request_exclusive_irq(link, pdacf_interrupt); |
232 | if (ret) | 227 | if (ret) |
233 | goto failed; | 228 | goto failed; |
234 | 229 | ||
@@ -236,7 +231,7 @@ static int pdacf_config(struct pcmcia_device *link) | |||
236 | if (ret) | 231 | if (ret) |
237 | goto failed; | 232 | goto failed; |
238 | 233 | ||
239 | if (snd_pdacf_assign_resources(pdacf, link->io.BasePort1, link->irq.AssignedIRQ) < 0) | 234 | if (snd_pdacf_assign_resources(pdacf, link->io.BasePort1, link->irq) < 0) |
240 | goto failed; | 235 | goto failed; |
241 | 236 | ||
242 | link->dev_node = &pdacf->node; | 237 | link->dev_node = &pdacf->node; |
diff --git a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c index cfd1438bcc64..5eced7a7c987 100644 --- a/sound/pcmcia/vx/vxpocket.c +++ b/sound/pcmcia/vx/vxpocket.c | |||
@@ -162,10 +162,6 @@ static int snd_vxpocket_new(struct snd_card *card, int ibl, | |||
162 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; | 162 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; |
163 | link->io.NumPorts1 = 16; | 163 | link->io.NumPorts1 = 16; |
164 | 164 | ||
165 | link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; | ||
166 | |||
167 | link->irq.Handler = &snd_vx_irq_handler; | ||
168 | |||
169 | link->conf.Attributes = CONF_ENABLE_IRQ; | 165 | link->conf.Attributes = CONF_ENABLE_IRQ; |
170 | link->conf.IntType = INT_MEMORY_AND_IO; | 166 | link->conf.IntType = INT_MEMORY_AND_IO; |
171 | link->conf.ConfigIndex = 1; | 167 | link->conf.ConfigIndex = 1; |
@@ -235,7 +231,7 @@ static int vxpocket_config(struct pcmcia_device *link) | |||
235 | if (ret) | 231 | if (ret) |
236 | goto failed; | 232 | goto failed; |
237 | 233 | ||
238 | ret = pcmcia_request_irq(link, &link->irq); | 234 | ret = pcmcia_request_exclusive_irq(link, snd_vx_irq_handler); |
239 | if (ret) | 235 | if (ret) |
240 | goto failed; | 236 | goto failed; |
241 | 237 | ||
@@ -246,7 +242,7 @@ static int vxpocket_config(struct pcmcia_device *link) | |||
246 | chip->dev = &link->dev; | 242 | chip->dev = &link->dev; |
247 | snd_card_set_dev(chip->card, chip->dev); | 243 | snd_card_set_dev(chip->card, chip->dev); |
248 | 244 | ||
249 | if (snd_vxpocket_assign_resources(chip, link->io.BasePort1, link->irq.AssignedIRQ) < 0) | 245 | if (snd_vxpocket_assign_resources(chip, link->io.BasePort1, link->irq) < 0) |
250 | goto failed; | 246 | goto failed; |
251 | 247 | ||
252 | link->dev_node = &vxp->node; | 248 | link->dev_node = &vxp->node; |