Browse Source

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>
imx_3.10.17_1.0.0_ga
Dominik Brodowski 11 years ago
parent
commit
eb14120f74
58 changed files with 244 additions and 593 deletions
  1. +10
    -0
      Documentation/pcmcia/driver-changes.txt
  2. +2
    -4
      drivers/ata/pata_pcmcia.c
  3. +2
    -5
      drivers/bluetooth/bluecard_cs.c
  4. +2
    -5
      drivers/bluetooth/bt3c_cs.c
  5. +2
    -5
      drivers/bluetooth/btuart_cs.c
  6. +2
    -5
      drivers/bluetooth/dtl1_cs.c
  7. +2
    -9
      drivers/char/pcmcia/ipwireless/main.c
  8. +3
    -9
      drivers/char/pcmcia/synclink_cs.c
  9. +3
    -5
      drivers/ide/ide-cs.c
  10. +5
    -12
      drivers/isdn/hardware/avm/avm_cs.c
  11. +4
    -8
      drivers/isdn/hisax/avma1_cs.c
  12. +3
    -10
      drivers/isdn/hisax/elsa_cs.c
  13. +3
    -20
      drivers/isdn/hisax/sedlbauer_cs.c
  14. +3
    -10
      drivers/isdn/hisax/teles_cs.c
  15. +2
    -4
      drivers/net/pcmcia/3c574_cs.c
  16. +3
    -4
      drivers/net/pcmcia/3c589_cs.c
  17. +4
    -9
      drivers/net/pcmcia/axnet_cs.c
  18. +3
    -5
      drivers/net/pcmcia/com20020_cs.c
  19. +2
    -8
      drivers/net/pcmcia/fmvj18x_cs.c
  20. +3
    -5
      drivers/net/pcmcia/ibmtr_cs.c
  21. +2
    -4
      drivers/net/pcmcia/nmclan_cs.c
  22. +2
    -6
      drivers/net/pcmcia/pcnet_cs.c
  23. +2
    -6
      drivers/net/pcmcia/smc91c92_cs.c
  24. +2
    -5
      drivers/net/pcmcia/xirc2ps_cs.c
  25. +5
    -20
      drivers/net/wireless/airo_cs.c
  26. +5
    -23
      drivers/net/wireless/atmel_cs.c
  27. +1
    -4
      drivers/net/wireless/b43/pcmcia.c
  28. +6
    -23
      drivers/net/wireless/hostap/hostap_cs.c
  29. +6
    -15
      drivers/net/wireless/libertas/if_cs.c
  30. +2
    -11
      drivers/net/wireless/orinoco/orinoco_cs.c
  31. +2
    -11
      drivers/net/wireless/orinoco/spectrum_cs.c
  32. +2
    -6
      drivers/net/wireless/ray_cs.c
  33. +2
    -6
      drivers/net/wireless/wl3501_cs.c
  34. +3
    -5
      drivers/parport/parport_cs.c
  35. +1
    -2
      drivers/pcmcia/ds.c
  36. +54
    -83
      drivers/pcmcia/pcmcia_resource.c
  37. +2
    -4
      drivers/scsi/pcmcia/aha152x_stub.c
  38. +2
    -4
      drivers/scsi/pcmcia/fdomain_stub.c
  39. +5
    -15
      drivers/scsi/pcmcia/nsp_cs.c
  40. +4
    -6
      drivers/scsi/pcmcia/qlogic_stub.c
  41. +2
    -4
      drivers/scsi/pcmcia/sym53c500_cs.c
  42. +9
    -18
      drivers/serial/serial_cs.c
  43. +1
    -1
      drivers/ssb/main.c
  44. +7
    -19
      drivers/staging/comedi/drivers/cb_das16_cs.c
  45. +4
    -12
      drivers/staging/comedi/drivers/das08_cs.c
  46. +5
    -18
      drivers/staging/comedi/drivers/ni_daq_700.c
  47. +5
    -18
      drivers/staging/comedi/drivers/ni_daq_dio24.c
  48. +5
    -19
      drivers/staging/comedi/drivers/ni_labpc_cs.c
  49. +3
    -6
      drivers/staging/comedi/drivers/ni_mio_cs.c
  50. +5
    -17
      drivers/staging/comedi/drivers/quatech_daqp_cs.c
  51. +2
    -6
      drivers/staging/netwave/netwave_cs.c
  52. +3
    -12
      drivers/staging/wavelan/wavelan_cs.c
  53. +3
    -6
      drivers/staging/wlags49_h2/wl_cs.c
  54. +5
    -13
      drivers/usb/host/sl811_cs.c
  55. +0
    -7
      include/pcmcia/cs.h
  56. +8
    -3
      include/pcmcia/ds.h
  57. +2
    -7
      sound/pcmcia/pdaudiocf/pdaudiocf.c
  58. +2
    -6
      sound/pcmcia/vx/vxpocket.c

+ 10
- 0
Documentation/pcmcia/driver-changes.txt View File

@ -1,4 +1,14 @@
This file details changes in 2.6 which affect PCMCIA card driver authors:
* New IRQ request rules (as of 2.6.35)
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.
* no cs_error / CS_CHECK / CONFIG_PCMCIA_DEBUG (as of 2.6.33)
Instead of the cs_error() callback or the CS_CHECK() macro, please use


+ 2
- 4
drivers/ata/pata_pcmcia.c View File

@ -268,7 +268,6 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)
pdev->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
pdev->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
pdev->io.IOAddrLines = 3;
pdev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
pdev->conf.Attributes = CONF_ENABLE_IRQ;
pdev->conf.IntType = INT_MEMORY_AND_IO;
@ -293,8 +292,7 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)
}
io_base = pdev->io.BasePort1;
ctl_base = stk->ctl_base;
ret = pcmcia_request_irq(pdev, &pdev->irq);
if (ret)
if (!pdev->irq)
goto failed;
ret = pcmcia_request_configuration(pdev, &pdev->conf);
@ -344,7 +342,7 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)
}
/* activate */
ret = ata_host_activate(host, pdev->irq.AssignedIRQ, ata_sff_interrupt,
ret = ata_host_activate(host, pdev->irq, ata_sff_interrupt,
IRQF_SHARED, &pcmcia_sht);
if (ret)
goto failed;


+ 2
- 5
drivers/bluetooth/bluecard_cs.c View File

@ -869,9 +869,6 @@ static int bluecard_probe(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
link->io.NumPorts1 = 8;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = bluecard_interrupt;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
@ -908,9 +905,9 @@ static int bluecard_config(struct pcmcia_device *link)
if (i != 0)
goto failed;
i = pcmcia_request_irq(link, &link->irq);
i = pcmcia_request_irq(link, bluecard_interrupt);
if (i != 0)
link->irq.AssignedIRQ = 0;
goto failed;
i = pcmcia_request_configuration(link, &link->conf);
if (i != 0)


+ 2
- 5
drivers/bluetooth/bt3c_cs.c View File

@ -661,9 +661,6 @@ static int bt3c_probe(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
link->io.NumPorts1 = 8;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = bt3c_interrupt;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
@ -743,9 +740,9 @@ static int bt3c_config(struct pcmcia_device *link)
goto failed;
found_port:
i = pcmcia_request_irq(link, &link->irq);
i = pcmcia_request_irq(link, &bt3c_interrupt);
if (i != 0)
link->irq.AssignedIRQ = 0;
goto failed;
i = pcmcia_request_configuration(link, &link->conf);
if (i != 0)


+ 2
- 5
drivers/bluetooth/btuart_cs.c View File

@ -590,9 +590,6 @@ static int btuart_probe(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
link->io.NumPorts1 = 8;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = btuart_interrupt;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
@ -672,9 +669,9 @@ static int btuart_config(struct pcmcia_device *link)
goto failed;
found_port:
i = pcmcia_request_irq(link, &link->irq);
i = pcmcia_request_irq(link, btuart_interrupt);
if (i != 0)
link->irq.AssignedIRQ = 0;
goto failed;
i = pcmcia_request_configuration(link, &link->conf);
if (i != 0)


+ 2
- 5
drivers/bluetooth/dtl1_cs.c View File

@ -575,9 +575,6 @@ static int dtl1_probe(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
link->io.NumPorts1 = 8;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = dtl1_interrupt;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
@ -621,9 +618,9 @@ static int dtl1_config(struct pcmcia_device *link)
if (pcmcia_loop_config(link, dtl1_confcheck, NULL) < 0)
goto failed;
i = pcmcia_request_irq(link, &link->irq);
i = pcmcia_request_irq(link, dtl1_interrupt);
if (i != 0)
link->irq.AssignedIRQ = 0;
goto failed;
i = pcmcia_request_configuration(link, &link->conf);
if (i != 0)


+ 2
- 9
drivers/char/pcmcia/ipwireless/main.c View File

@ -195,9 +195,6 @@ static int config_ipwireless(struct ipw_dev *ipw)
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = ipwireless_interrupt;
INIT_WORK(&ipw->work_reboot, signalled_reboot_work);
ipwireless_init_hardware_v1(ipw->hardware, link->io.BasePort1,
@ -205,8 +202,7 @@ static int config_ipwireless(struct ipw_dev *ipw)
ipw->is_v2_card, signalled_reboot_callback,
ipw);
ret = pcmcia_request_irq(link, &link->irq);
ret = pcmcia_request_irq(link, ipwireless_interrupt);
if (ret != 0)
goto exit;
@ -217,7 +213,7 @@ static int config_ipwireless(struct ipw_dev *ipw)
(unsigned int) link->io.BasePort1,
(unsigned int) (link->io.BasePort1 +
link->io.NumPorts1 - 1),
(unsigned int) link->irq.AssignedIRQ);
(unsigned int) link->irq);
if (ipw->attr_memory && ipw->common_memory)
printk(KERN_INFO IPWIRELESS_PCCARD_NAME
": attr memory 0x%08lx-0x%08lx, common memory 0x%08lx-0x%08lx\n",
@ -271,8 +267,6 @@ exit:
static void release_ipwireless(struct ipw_dev *ipw)
{
pcmcia_disable_device(ipw->link);
if (ipw->common_memory) {
release_mem_region(ipw->request_common_memory.Base,
ipw->request_common_memory.Size);
@ -288,7 +282,6 @@ static void release_ipwireless(struct ipw_dev *ipw)
if (ipw->attr_memory)
pcmcia_release_window(ipw->link, ipw->handle_attr_memory);
/* Break the link with Card Services */
pcmcia_disable_device(ipw->link);
}


+ 3
- 9
drivers/char/pcmcia/synclink_cs.c View File

@ -552,10 +552,6 @@ static int mgslpc_probe(struct pcmcia_device *link)
/* Initialize the struct pcmcia_device structure */
/* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = NULL;
link->conf.Attributes = 0;
link->conf.IntType = INT_MEMORY_AND_IO;
@ -608,9 +604,7 @@ static int mgslpc_config(struct pcmcia_device *link)
link->conf.ConfigIndex = 8;
link->conf.Present = PRESENT_OPTION;
link->irq.Handler = mgslpc_isr;
ret = pcmcia_request_irq(link, &link->irq);
ret = pcmcia_request_irq(link, mgslpc_isr);
if (ret)
goto failed;
ret = pcmcia_request_configuration(link, &link->conf);
@ -618,7 +612,7 @@ static int mgslpc_config(struct pcmcia_device *link)
goto failed;
info->io_base = link->io.BasePort1;
info->irq_level = link->irq.AssignedIRQ;
info->irq_level = link->irq;
/* add to linked list of devices */
sprintf(info->node.dev_name, "mgslpc0");
@ -628,7 +622,7 @@ static int mgslpc_config(struct pcmcia_device *link)
printk(KERN_INFO "%s: index 0x%02x:",
info->node.dev_name, link->conf.ConfigIndex);
if (link->conf.Attributes & CONF_ENABLE_IRQ)
printk(", irq %d", link->irq.AssignedIRQ);
printk(", irq %d", link->irq);
if (link->io.NumPorts1)
printk(", io 0x%04x-0x%04x", link->io.BasePort1,
link->io.BasePort1+link->io.NumPorts1-1);


+ 3
- 5
drivers/ide/ide-cs.c View File

@ -102,7 +102,6 @@ static int ide_probe(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
link->io.IOAddrLines = 3;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
@ -285,8 +284,7 @@ static int ide_config(struct pcmcia_device *link)
io_base = link->io.BasePort1;
ctl_base = stk->ctl_base;
ret = pcmcia_request_irq(link, &link->irq);
if (ret)
if (!link->irq)
goto failed;
ret = pcmcia_request_configuration(link, &link->conf);
if (ret)
@ -299,11 +297,11 @@ static int ide_config(struct pcmcia_device *link)
if (is_kme)
outb(0x81, ctl_base+1);
host = idecs_register(io_base, ctl_base, link->irq.AssignedIRQ, link);
host = idecs_register(io_base, ctl_base, link->irq, link);
if (host == NULL && link->io.NumPorts1 == 0x20) {
outb(0x02, ctl_base + 0x10);
host = idecs_register(io_base + 0x10, ctl_base + 0x10,
link->irq.AssignedIRQ, link);
link->irq, link);
}
if (host == NULL)


+ 5
- 12
drivers/isdn/hardware/avm/avm_cs.c View File

@ -107,9 +107,6 @@ static int avmcs_probe(struct pcmcia_device *p_dev)
p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
p_dev->io.NumPorts2 = 0;
/* Interrupt setup */
p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
/* General socket configuration */
p_dev->conf.Attributes = CONF_ENABLE_IRQ;
p_dev->conf.IntType = INT_MEMORY_AND_IO;
@ -172,7 +169,7 @@ static int avmcs_configcheck(struct pcmcia_device *p_dev,
static int avmcs_config(struct pcmcia_device *link)
{
local_info_t *dev;
int i;
int i = -1;
char devname[128];
int cardtype;
int (*addcard)(unsigned int port, unsigned irq);
@ -190,11 +187,7 @@ static int avmcs_config(struct pcmcia_device *link)
return -ENODEV;
do {
/*
* allocate an interrupt line
*/
i = pcmcia_request_irq(link, &link->irq);
if (i != 0) {
if (!link->irq) {
/* undo */
pcmcia_disable_device(link);
break;
@ -249,9 +242,9 @@ static int avmcs_config(struct pcmcia_device *link)
default:
case AVM_CARDTYPE_B1: addcard = b1pcmcia_addcard_b1; break;
}
if ((i = (*addcard)(link->io.BasePort1, link->irq.AssignedIRQ)) < 0) {
if ((i = (*addcard)(link->io.BasePort1, link->irq)) < 0) {
printk(KERN_ERR "avm_cs: failed to add AVM-%s-Controller at i/o %#x, irq %d\n",
dev->node.dev_name, link->io.BasePort1, link->irq.AssignedIRQ);
dev->node.dev_name, link->io.BasePort1, link->irq);
avmcs_release(link);
return -ENODEV;
}
@ -270,7 +263,7 @@ static int avmcs_config(struct pcmcia_device *link)
static void avmcs_release(struct pcmcia_device *link)
{
b1pcmcia_delcard(link->io.BasePort1, link->irq.AssignedIRQ);
b1pcmcia_delcard(link->io.BasePort1, link->irq);
pcmcia_disable_device(link);
} /* avmcs_release */


+ 4
- 8
drivers/isdn/hisax/avma1_cs.c View File

@ -119,9 +119,6 @@ static int __devinit avma1cs_probe(struct pcmcia_device *p_dev)
p_dev->io.Attributes2 = IO_DATA_PATH_WIDTH_16;
p_dev->io.IOAddrLines = 5;
/* Interrupt setup */
p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
/* General socket configuration */
p_dev->conf.Attributes = CONF_ENABLE_IRQ;
p_dev->conf.IntType = INT_MEMORY_AND_IO;
@ -177,7 +174,7 @@ static int avma1cs_configcheck(struct pcmcia_device *p_dev,
static int __devinit avma1cs_config(struct pcmcia_device *link)
{
local_info_t *dev;
int i;
int i = -1;
char devname[128];
IsdnCard_t icard;
int busy = 0;
@ -197,8 +194,7 @@ static int __devinit avma1cs_config(struct pcmcia_device *link)
/*
* allocate an interrupt line
*/
i = pcmcia_request_irq(link, &link->irq);
if (i != 0) {
if (!link->irq) {
/* undo */
pcmcia_disable_device(link);
break;
@ -230,9 +226,9 @@ static int __devinit avma1cs_config(struct pcmcia_device *link)
}
printk(KERN_NOTICE "avma1_cs: checking at i/o %#x, irq %d\n",
link->io.BasePort1, link->irq.AssignedIRQ);
link->io.BasePort1, link->irq);
icard.para[0] = link->irq.AssignedIRQ;
icard.para[0] = link->irq;
icard.para[1] = link->io.BasePort1;
icard.protocol = isdnprot;
icard.typ = ISDN_CTYPE_A1_PCMCIA;


+ 3
- 10
drivers/isdn/hisax/elsa_cs.c View File

@ -136,10 +136,6 @@ static int __devinit elsa_cs_probe(struct pcmcia_device *link)
local->cardnr = -1;
/* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = NULL;
/*
General socket configuration defaults can go here. In this
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)
if (i != 0)
goto failed;
i = pcmcia_request_irq(link, &link->irq);
if (i != 0) {
link->irq.AssignedIRQ = 0;
if (!link->irq)
goto failed;
}
i = pcmcia_request_configuration(link, &link->conf);
if (i != 0)
@ -244,7 +237,7 @@ static int __devinit elsa_cs_config(struct pcmcia_device *link)
printk(KERN_INFO "%s: index 0x%02x: ",
dev->node.dev_name, link->conf.ConfigIndex);
if (link->conf.Attributes & CONF_ENABLE_IRQ)
printk(", irq %d", link->irq.AssignedIRQ);
printk(", irq %d", link->irq);
if (link->io.NumPorts1)
printk(", io 0x%04x-0x%04x", link->io.BasePort1,
link->io.BasePort1+link->io.NumPorts1-1);
@ -253,7 +246,7 @@ static int __devinit elsa_cs_config(struct pcmcia_device *link)
link->io.BasePort2+link->io.NumPorts2-1);
printk("\n");
icard.para[0] = link->irq.AssignedIRQ;
icard.para[0] = link->irq;
icard.para[1] = link->io.BasePort1;
icard.protocol = protocol;
icard.typ = ISDN_CTYPE_ELSA_PCMCIA;


+ 3
- 20
drivers/isdn/hisax/sedlbauer_cs.c View File

@ -143,10 +143,6 @@ static int __devinit sedlbauer_probe(struct pcmcia_device *link)
local->p_dev = link;
link->priv = local;
/* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = NULL;
/*
General socket configuration defaults can go here. In this
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,
else if (dflt->vpp1.present & (1<<CISTPL_POWER_VNOM))
p_dev->conf.Vpp = dflt->vpp1.param[CISTPL_POWER_VNOM]/10000;
/* Do we need to allocate an interrupt? */
if (cfg->irq.IRQInfo1 || dflt->irq.IRQInfo1)
p_dev->conf.Attributes |= CONF_ENABLE_IRQ;
p_dev->conf.Attributes |= CONF_ENABLE_IRQ;
/* IO window settings */
p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0;
@ -312,17 +306,6 @@ static int __devinit sedlbauer_config(struct pcmcia_device *link)
if (ret)
goto failed;
/*
Allocate an interrupt line. Note that this does not assign a
handler to the interrupt, unless the 'Handler' member of the
irq structure is initialized.
*/
if (link->conf.Attributes & CONF_ENABLE_IRQ) {
ret = pcmcia_request_irq(link, &link->irq);
if (ret)
goto failed;
}
/*
This actually configures the PCMCIA socket -- setting up
the I/O windows and the interrupt mapping, and putting the
@ -346,7 +329,7 @@ static int __devinit sedlbauer_config(struct pcmcia_device *link)
if (link->conf.Vpp)
printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10);
if (link->conf.Attributes & CONF_ENABLE_IRQ)
printk(", irq %d", link->irq.AssignedIRQ);
printk(", irq %d", link->irq);
if (link->io.NumPorts1)
printk(", io 0x%04x-0x%04x", link->io.BasePort1,
link->io.BasePort1+link->io.NumPorts1-1);
@ -358,7 +341,7 @@ static int __devinit sedlbauer_config(struct pcmcia_device *link)
req->Base+req->Size-1);
printk("\n");
icard.para[0] = link->irq.AssignedIRQ;
icard.para[0] = link->irq;
icard.para[1] = link->io.BasePort1;
icard.protocol = protocol;
icard.typ = ISDN_CTYPE_SEDLBAUER_PCMCIA;


+ 3
- 10
drivers/isdn/hisax/teles_cs.c View File

@ -126,10 +126,6 @@ static int __devinit teles_probe(struct pcmcia_device *link)
local->p_dev = link;
link->priv = local;
/* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = NULL;
/*
General socket configuration defaults can go here. In this
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)
if (i != 0)
goto cs_failed;
i = pcmcia_request_irq(link, &link->irq);
if (i != 0) {
link->irq.AssignedIRQ = 0;
if (!link->irq)
goto cs_failed;
}
i = pcmcia_request_configuration(link, &link->conf);
if (i != 0)
@ -234,7 +227,7 @@ static int __devinit teles_cs_config(struct pcmcia_device *link)
printk(KERN_INFO "%s: index 0x%02x:",
dev->node.dev_name, link->conf.ConfigIndex);
if (link->conf.Attributes & CONF_ENABLE_IRQ)
printk(", irq %d", link->irq.AssignedIRQ);
printk(", irq %d", link->irq);
if (link->io.NumPorts1)
printk(", io 0x%04x-0x%04x", link->io.BasePort1,
link->io.BasePort1+link->io.NumPorts1-1);
@ -243,7 +236,7 @@ static int __devinit teles_cs_config(struct pcmcia_device *link)
link->io.BasePort2+link->io.NumPorts2-1);
printk("\n");
icard.para[0] = link->irq.AssignedIRQ;
icard.para[0] = link->irq;
icard.para[1] = link->io.BasePort1;
icard.protocol = protocol;
icard.typ = ISDN_CTYPE_TELESPCMCIA;


+ 2
- 4
drivers/net/pcmcia/3c574_cs.c View File

@ -283,8 +283,6 @@ static int tc574_probe(struct pcmcia_device *link)
spin_lock_init(&lp->window_lock);
link->io.NumPorts1 = 32;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_16;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = &el3_interrupt;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
link->conf.ConfigIndex = 1;
@ -353,7 +351,7 @@ static int tc574_config(struct pcmcia_device *link)
if (i != 0)
goto failed;
ret = pcmcia_request_irq(link, &link->irq);
ret = pcmcia_request_irq(link, el3_interrupt);
if (ret)
goto failed;
@ -361,7 +359,7 @@ static int tc574_config(struct pcmcia_device *link)
if (ret)
goto failed;
dev->irq = link->irq.AssignedIRQ;
dev->irq = link->irq;
dev->base_addr = link->io.BasePort1;
ioaddr = dev->base_addr;


+ 3
- 4
drivers/net/pcmcia/3c589_cs.c View File

@ -194,8 +194,7 @@ static int tc589_probe(struct pcmcia_device *link)
spin_lock_init(&lp->lock);
link->io.NumPorts1 = 16;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_16;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = &el3_interrupt;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
link->conf.ConfigIndex = 1;
@ -271,7 +270,7 @@ static int tc589_config(struct pcmcia_device *link)
if (i != 0)
goto failed;
ret = pcmcia_request_irq(link, &link->irq);
ret = pcmcia_request_irq(link, el3_interrupt);
if (ret)
goto failed;
@ -279,7 +278,7 @@ static int tc589_config(struct pcmcia_device *link)
if (ret)
goto failed;
dev->irq = link->irq.AssignedIRQ;
dev->irq = link->irq;
dev->base_addr = link->io.BasePort1;
ioaddr = dev->base_addr;
EL3WINDOW(0);


+ 4
- 9
drivers/net/pcmcia/axnet_cs.c View File

@ -168,7 +168,6 @@ static int axnet_probe(struct pcmcia_device *link)
info = PRIV(dev);
info->p_dev = link;
link->priv = dev;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
@ -265,12 +264,9 @@ static int try_io_port(struct pcmcia_device *link)
int j, ret;
if (link->io.NumPorts1 == 32) {
link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
if (link->io.NumPorts2 > 0) {
/* for master/slave multifunction cards */
/* for master/slave multifunction cards */
if (link->io.NumPorts2 > 0)
link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
link->irq.Attributes =
IRQ_TYPE_DYNAMIC_SHARING;
}
} else {
/* This should be two 16-port windows */
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
@ -336,8 +332,7 @@ static int axnet_config(struct pcmcia_device *link)
if (ret != 0)
goto failed;
ret = pcmcia_request_irq(link, &link->irq);
if (ret)
if (!link->irq)
goto failed;
if (link->io.NumPorts2 == 8) {
@ -349,7 +344,7 @@ static int axnet_config(struct pcmcia_device *link)
if (ret)
goto failed;
dev->irq = link->irq.AssignedIRQ;
dev->irq = link->irq;
dev->base_addr = link->io.BasePort1;
if (!get_prom(link)) {


+ 3
- 5
drivers/net/pcmcia/com20020_cs.c View File

@ -163,7 +163,6 @@ static int com20020_probe(struct pcmcia_device *p_dev)
p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
p_dev->io.NumPorts1 = 16;
p_dev->io.IOAddrLines = 16;
p_dev->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
p_dev->conf.Attributes = CONF_ENABLE_IRQ;
p_dev->conf.IntType = INT_MEMORY_AND_IO;
@ -275,15 +274,14 @@ static int com20020_config(struct pcmcia_device *link)
dev_dbg(&link->dev, "got ioaddr %Xh\n", ioaddr);
dev_dbg(&link->dev, "request IRQ %d\n",
link->irq.AssignedIRQ);
i = pcmcia_request_irq(link, &link->irq);
if (i != 0)
link->irq);
if (!link->irq)
{
dev_dbg(&link->dev, "requestIRQ failed totally!\n");
goto failed;
}
dev->irq = link->irq.AssignedIRQ;
dev->irq = link->irq;
ret = pcmcia_request_configuration(link, &link->conf);
if (ret)


+ 2
- 8
drivers/net/pcmcia/fmvj18x_cs.c View File

@ -254,10 +254,6 @@ static int fmvj18x_probe(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
link->io.IOAddrLines = 5;
/* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = fjn_interrupt;
/* General socket configuration */
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
@ -425,8 +421,6 @@ static int fmvj18x_config(struct pcmcia_device *link)
}
if (link->io.NumPorts2 != 0) {
link->irq.Attributes =
IRQ_TYPE_DYNAMIC_SHARING;
ret = mfc_try_io_port(link);
if (ret != 0) goto failed;
} else if (cardtype == UNGERMANN) {
@ -437,14 +431,14 @@ static int fmvj18x_config(struct pcmcia_device *link)
if (ret)
goto failed;
}
ret = pcmcia_request_irq(link, &link->irq);
ret = pcmcia_request_irq(link, fjn_interrupt);
if (ret)
goto failed;
ret = pcmcia_request_configuration(link, &link->conf);
if (ret)
goto failed;
dev->irq = link->irq.AssignedIRQ;
dev->irq = link->irq;
dev->base_addr = link->io.BasePort1;
if (link->io.BasePort2 != 0) {


+ 3
- 5
drivers/net/pcmcia/ibmtr_cs.c View File

@ -156,8 +156,6 @@ static int __devinit ibmtr_attach(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
link->io.NumPorts1 = 4;
link->io.IOAddrLines = 16;
link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
link->irq.Handler = ibmtr_interrupt;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
link->conf.Present = PRESENT_OPTION;
@ -238,11 +236,11 @@ static int __devinit ibmtr_config(struct pcmcia_device *link)
}
dev->base_addr = link->io.BasePort1;
ret = pcmcia_request_irq(link, &link->irq);
ret = pcmcia_request_exclusive_irq(link, ibmtr_interrupt);
if (ret)
goto failed;
dev->irq = link->irq.AssignedIRQ;
ti->irq = link->irq.AssignedIRQ;
dev->irq = link->irq;
ti->irq = link->irq;
ti->global_int_enable=GLOBAL_INT_ENABLE+((dev->irq==9) ? 2 : dev->irq);
/* Allocate the MMIO memory window */


+ 2
- 4
drivers/net/pcmcia/nmclan_cs.c View File

@ -463,8 +463,6 @@ static int nmclan_probe(struct pcmcia_device *link)
link->io.NumPorts1 = 32;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
link->io.IOAddrLines = 5;
link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
link->irq.Handler = mace_interrupt;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
link->conf.ConfigIndex = 1;
@ -652,14 +650,14 @@ static int nmclan_config(struct pcmcia_device *link)
ret = pcmcia_request_io(link, &link->io);
if (ret)
goto failed;
ret = pcmcia_request_irq(link, &link->irq);
ret = pcmcia_request_exclusive_irq(link, mace_interrupt);
if (ret)
goto failed;
ret = pcmcia_request_configuration(link, &link->conf);
if (ret)
goto failed;
dev->irq = link->irq.AssignedIRQ;
dev->irq = link->irq;
dev->base_addr = link->io.BasePort1;
ioaddr = dev->base_addr;


+ 2
- 6
drivers/net/pcmcia/pcnet_cs.c View File

@ -264,7 +264,6 @@ static int pcnet_probe(struct pcmcia_device *link)
info->p_dev = link;
link->priv = dev;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
@ -488,8 +487,6 @@ static int try_io_port(struct pcmcia_device *link)
if (link->io.NumPorts2 > 0) {
/* for master/slave multifunction cards */
link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
link->irq.Attributes =
IRQ_TYPE_DYNAMIC_SHARING;
}
} else {
/* This should be two 16-port windows */
@ -559,8 +556,7 @@ static int pcnet_config(struct pcmcia_device *link)
if (ret)
goto failed;
ret = pcmcia_request_irq(link, &link->irq);
if (ret)
if (!link->irq)
goto failed;
if (link->io.NumPorts2 == 8) {
@ -574,7 +570,7 @@ static int pcnet_config(struct pcmcia_device *link)
ret = pcmcia_request_configuration(link, &link->conf);
if (ret)
goto failed;
dev->irq = link->irq.AssignedIRQ;
dev->irq = link->irq;
dev->base_addr = link->io.BasePort1;
if (info->flags & HAS_MISC_REG) {
if ((if_port == 1) || (if_port == 2))


+ 2
- 6
drivers/net/pcmcia/smc91c92_cs.c View File

@ -329,8 +329,6 @@ static int smc91c92_probe(struct pcmcia_device *link)
link->io.NumPorts1 = 16;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
link->io.IOAddrLines = 4;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = &smc_interrupt;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
@ -453,7 +451,6 @@ static int mhz_mfc_config(struct pcmcia_device *link)
link->conf.Attributes |= CONF_ENABLE_SPKR;
link->conf.Status = CCSR_AUDIO_ENA;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->io.IOAddrLines = 16;
link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
link->io.NumPorts2 = 8;
@ -652,7 +649,6 @@ static int osi_config(struct pcmcia_device *link)
link->conf.Attributes |= CONF_ENABLE_SPKR;
link->conf.Status = CCSR_AUDIO_ENA;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->io.NumPorts1 = 64;
link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
link->io.NumPorts2 = 8;
@ -877,7 +873,7 @@ static int smc91c92_config(struct pcmcia_device *link)
if (i)
goto config_failed;
i = pcmcia_request_irq(link, &link->irq);
i = pcmcia_request_irq(link, smc_interrupt);
if (i)
goto config_failed;
i = pcmcia_request_configuration(link, &link->conf);
@ -887,7 +883,7 @@ static int smc91c92_config(struct pcmcia_device *link)
if (smc->manfid == MANFID_MOTOROLA)
mot_config(link);
dev->irq = link->irq.AssignedIRQ;
dev->irq = link->irq;
if ((if_port >= 0) && (if_port <= 2))
dev->if_port = if_port;


+ 2
- 5
drivers/net/pcmcia/xirc2ps_cs.c View File

@ -555,7 +555,6 @@ xirc2ps_probe(struct pcmcia_device *link)
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
link->conf.ConfigIndex = 1;
link->irq.Handler = xirc2ps_interrupt;
/* Fill in card specific entries */
dev->netdev_ops = &netdev_ops;
@ -841,7 +840,6 @@ xirc2ps_config(struct pcmcia_device * link)
link->conf.Attributes |= CONF_ENABLE_SPKR;
link->conf.Status |= CCSR_AUDIO_ENA;
}
link->irq.Attributes |= IRQ_TYPE_DYNAMIC_SHARING;
link->io.NumPorts2 = 8;
link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
if (local->dingo) {
@ -866,7 +864,6 @@ xirc2ps_config(struct pcmcia_device * link)
}
printk(KNOT_XIRC "no ports available\n");
} else {
link->irq.Attributes |= IRQ_TYPE_DYNAMIC_SHARING;
link->io.NumPorts1 = 16;
for (ioaddr = 0x300; ioaddr < 0x400; ioaddr += 0x10) {
link->io.BasePort1 = ioaddr;
@ -885,7 +882,7 @@ xirc2ps_config(struct pcmcia_device * link)
* Now allocate an interrupt line. Note that this does not
* actually assign a handler to the interrupt.
*/
if ((err=pcmcia_request_irq(link, &link->irq)))
if ((err=pcmcia_request_irq(link, xirc2ps_interrupt)))
goto config_error;
/****************
@ -982,7 +979,7 @@ xirc2ps_config(struct pcmcia_device * link)
printk(KNOT_XIRC "invalid if_port requested\n");
/* we can now register the device with the net subsystem */
dev->irq = link->irq.AssignedIRQ;
dev->irq = link->irq;
dev->base_addr = link->io.BasePort1;
if (local->dingo)


+ 5
- 20
drivers/net/wireless/airo_cs.c View File

@ -132,10 +132,6 @@ static int airo_probe(struct pcmcia_device *p_dev)
dev_dbg(&p_dev->dev, "airo_attach()\n");
/* Interrupt setup */
p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
p_dev->irq.Handler = NULL;
/*
General socket configuration defaults can go here. In this
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,
else if (dflt->vpp1.present & (1<<CISTPL_POWER_VNOM))
p_dev->conf.Vpp = dflt->vpp1.param[CISTPL_POWER_VNOM]/10000;
/* Do we need to allocate an interrupt? */
if (cfg->irq.IRQInfo1 || dflt->irq.IRQInfo1)
p_dev->conf.Attributes |= CONF_ENABLE_IRQ;
p_dev->conf.Attributes |= CONF_ENABLE_IRQ;
/* IO window settings */
p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0;
@ -300,16 +294,8 @@ static int airo_config(struct pcmcia_device *link)
if (ret)
goto failed;
/*
Allocate an interrupt line. Note that this does not assign a
handler to the interrupt, unless the 'Handler' member of the
irq structure is initialized.
*/
if (link->conf.Attributes & CONF_ENABLE_IRQ) {
ret = pcmcia_request_irq(link, &link->irq);
if (ret)
goto failed;
}
if (!link->irq)
goto failed;
/*
This actually configures the PCMCIA socket -- setting up
@ -320,7 +306,7 @@ static int airo_config(struct pcmcia_device *link)
if (ret)
goto failed;
((local_info_t *)link->priv)->eth_dev =
init_airo_card(link->irq.AssignedIRQ,
init_airo_card(link->irq,
link->io.BasePort1, 1, &link->dev);
if (!((local_info_t *)link->priv)->eth_dev)
goto failed;
@ -338,8 +324,7 @@ static int airo_config(struct pcmcia_device *link)
dev->node.dev_name, link->conf.ConfigIndex);
if (link->conf.Vpp)
printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10);
if (link->conf.Attributes & CONF_ENABLE_IRQ)
printk(", irq %d", link->irq.AssignedIRQ);
printk(", irq %d", link->irq);
if (link->io.NumPorts1)
printk(", io 0x%04x-0x%04x", link->io.BasePort1,
link->io.BasePort1+link->io.NumPorts1-1);


+ 5
- 23
drivers/net/wireless/atmel_cs.c View File

@ -141,10 +141,6 @@ static int atmel_probe(struct pcmcia_device *p_dev)
dev_dbg(&p_dev->dev, "atmel_attach()\n");
/* Interrupt setup */
p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
p_dev->irq.Handler = NULL;
/*
General socket configuration defaults can go here. In this
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,
else if (dflt->vpp1.present & (1<<CISTPL_POWER_VNOM))
p_dev->conf.Vpp = dflt->vpp1.param[CISTPL_POWER_VNOM]/10000;
/* Do we need to allocate an interrupt? */
if (cfg->irq.IRQInfo1 || dflt->irq.IRQInfo1)
p_dev->conf.Attributes |= CONF_ENABLE_IRQ;
p_dev->conf.Attributes |= CONF_ENABLE_IRQ;
/* IO window settings */
p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0;
@ -278,15 +272,9 @@ static int atmel_config(struct pcmcia_device *link)
if (pcmcia_loop_config(link, atmel_config_check, NULL))
goto failed;
/*
Allocate an interrupt line. Note that this does not assign a
handler to the interrupt, unless the 'Handler' member of the
irq structure is initialized.
*/
if (link->conf.Attributes & CONF_ENABLE_IRQ) {
ret = pcmcia_request_irq(link, &link->irq);
if (ret)
goto failed;
if (!link->irq) {
dev_err(&link->dev, "atmel: cannot assign IRQ: check that CONFIG_ISA is set in kernel config.");
goto failed;
}
/*
@ -298,14 +286,8 @@ static int atmel_config(struct pcmcia_device *link)
if (ret)
goto failed;
if (link->irq.AssignedIRQ == 0) {
printk(KERN_ALERT
"atmel: cannot assign IRQ: check that CONFIG_ISA is set in kernel config.");
goto failed;
}
((local_info_t*)link->priv)->eth_dev =
init_atmel_card(link->irq.AssignedIRQ,
init_atmel_card(link->irq,
link->io.BasePort1,
did ? did->driver_info : ATMEL_FW_TYPE_NONE,
&link->dev,


+ 1
- 4
drivers/net/wireless/b43/pcmcia.c View File

@ -98,10 +98,7 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev)
if (res != 0)
goto err_disable;
dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
dev->irq.Handler = NULL; /* The handler is registered later. */
res = pcmcia_request_irq(dev, &dev->irq);
if (res != 0)
if (!dev->irq)
goto err_disable;
res = pcmcia_request_configuration(dev, &dev->conf);


+ 6
- 23
drivers/net/wireless/hostap/hostap_cs.c View File

@ -556,15 +556,7 @@ static int prism2_config_check(struct pcmcia_device *p_dev,
p_dev->conf.Vpp = dflt->vpp1.param[CISTPL_POWER_VNOM] / 10000;
/* Do we need to allocate an interrupt? */
if (cfg->irq.IRQInfo1 || dflt->irq.IRQInfo1)
p_dev->conf.Attributes |= CONF_ENABLE_IRQ;
else if (!(p_dev->conf.Attributes & CONF_ENABLE_IRQ)) {
/* At least Compaq WL200 does not have IRQInfo1 set,
* but it does not work without interrupts.. */
printk(KERN_WARNING "Config has no IRQ info, but trying to "
"enable IRQ anyway..\n");
p_dev->conf.Attributes |= CONF_ENABLE_IRQ;
}
p_dev->conf.Attributes |= CONF_ENABLE_IRQ;
/* IO window settings */
PDEBUG(DEBUG_EXTRA, "IO window settings: cfg->io.nwin=%d "
@ -636,18 +628,9 @@ static int prism2_config(struct pcmcia_device *link)
strcpy(hw_priv->node.dev_name, dev->name);
link->dev_node = &hw_priv->node;
/*
* Allocate an interrupt line. Note that this does not assign a
* handler to the interrupt, unless the 'Handler' member of the
* irq structure is initialized.
*/
if (link->conf.Attributes & CONF_ENABLE_IRQ) {
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = prism2_interrupt;
ret = pcmcia_request_irq(link, &link->irq);
if (ret)
goto failed;
}
ret = pcmcia_request_irq(link, prism2_interrupt);
if (ret)
goto failed;
/*
* This actually configures the PCMCIA socket -- setting up
@ -658,7 +641,7 @@ static int prism2_config(struct pcmcia_device *link)
if (ret)
goto failed;
dev->irq = link->irq.AssignedIRQ;
dev->irq = link->irq;
dev->base_addr = link->io.BasePort1;
/* Finally, report what we've done */
@ -668,7 +651,7 @@ static int prism2_config(struct pcmcia_device *link)
printk(", Vpp %d.%d", link->conf.Vpp / 10,
link->conf.Vpp % 10);
if (link->conf.Attributes & CONF_ENABLE_IRQ)
printk(", irq %d", link->irq.AssignedIRQ);
printk(", irq %d", link->irq);
if (link->io.NumPorts1)
printk(", io 0x%04x-0x%04x", link->io.BasePort1,
link->io.BasePort1+link->io.NumPorts1-1);


+ 6
- 15
drivers/net/wireless/libertas/if_cs.c View File

@ -777,7 +777,7 @@ static void if_cs_release(struct pcmcia_device *p_dev)
lbs_deb_enter(LBS_DEB_CS);
free_irq(p_dev->irq.AssignedIRQ, card);
free_irq(p_dev->irq, card);
pcmcia_disable_device(p_dev);
if (card->iobase)
ioport_unmap(card->iobase);
@ -807,8 +807,7 @@ static int if_cs_ioprobe(struct pcmcia_device *p_dev,
p_dev->io.NumPorts1 = cfg->io.win[0].len;
/* Do we need to allocate an interrupt? */
if (cfg->irq.IRQInfo1)
p_dev->conf.Attributes |= CONF_ENABLE_IRQ;
p_dev->conf.Attributes |= CONF_ENABLE_IRQ;
/* IO window settings */
if (cfg->io.nwin != 1) {
@ -837,9 +836,6 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
card->p_dev = p_dev;
p_dev->priv = card;
p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
p_dev->irq.Handler = NULL;
p_dev->conf.Attributes = 0;
p_dev->conf.IntType = INT_MEMORY_AND_IO;
@ -854,13 +850,8 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
* a handler to the interrupt, unless the 'Handler' member of
* the irq structure is initialized.
*/
if (p_dev->conf.Attributes & CONF_ENABLE_IRQ) {
ret = pcmcia_request_irq(p_dev, &p_dev->irq);
if (ret) {
lbs_pr_err("error in pcmcia_request_irq\n");
goto out1;
}
}
if (!p_dev->irq)
goto out1;
/* Initialize io access */
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)
/* Finally, report what we've done */
lbs_deb_cs("irq %d, io 0x%04x-0x%04x\n",
p_dev->irq.AssignedIRQ, p_dev->io.BasePort1,
p_dev->irq, p_dev->io.BasePort1,
p_dev->io.BasePort1 + p_dev->io.NumPorts1 - 1);
/*
@ -940,7 +931,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
priv->fw_ready = 1;
/* Now actually get the IRQ */
ret = request_irq(p_dev->irq.AssignedIRQ, if_cs_interrupt,
ret = request_irq(p_dev->irq, if_cs_interrupt,
IRQF_SHARED, DRV_NAME, card);
if (ret) {
lbs_pr_err("error in request_irq\n");


+ 2
- 11
drivers/net/wireless/orinoco/orinoco_cs.c View File

@ -119,10 +119,6 @@ orinoco_cs_probe(struct pcmcia_device *link)
card->p_dev = link;
link->priv = priv;
/* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = orinoco_interrupt;
/* General socket configuration defaults can go here. In this
* client, we assume very little, and rely on the CIS for
* almost everything. In most clients, many details (i.e.,
@ -258,12 +254,7 @@ orinoco_cs_config(struct pcmcia_device *link)
goto failed;
}
/*
* Allocate an interrupt line. Note that this does not assign
* a handler to the interrupt, unless the 'Handler' member of
* the irq structure is initialized.
*/
ret = pcmcia_request_irq(link, &link->irq);
ret = pcmcia_request_irq(link, orinoco_interrupt);
if (ret)
goto failed;
@ -296,7 +287,7 @@ orinoco_cs_config(struct pcmcia_device *link)
/* Register an interface with the stack */
if (orinoco_if_add(priv, link->io.BasePort1,
link->irq.AssignedIRQ) != 0) {
link->irq) != 0) {
printk(KERN_ERR PFX "orinoco_if_add() failed\n");
goto failed;
}


+ 2
- 11
drivers/net/wireless/orinoco/spectrum_cs.c View File

@ -193,10 +193,6 @@ spectrum_cs_probe(struct pcmcia_device *link)
card->p_dev = link;
link->priv = priv;
/* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = orinoco_interrupt;
/* General socket configuration defaults can go here. In this
* client, we assume very little, and rely on the CIS for
* almost everything. In most clients, many details (i.e.,
@ -332,12 +328,7 @@ spectrum_cs_config(struct pcmcia_device *link)
goto failed;
}
/*
* Allocate an interrupt line. Note that this does not assign
* a handler to the interrupt, unless the 'Handler' member of
* the irq structure is initialized.
*/
ret = pcmcia_request_irq(link, &link->irq);
ret = pcmcia_request_irq(link, orinoco_interrupt);
if (ret)
goto failed;
@ -374,7 +365,7 @@ spectrum_cs_config(struct pcmcia_device *link)
/* Register an interface with the stack */
if (orinoco_if_add(priv, link->io.BasePort1,
link->irq.AssignedIRQ) != 0) {
link->irq) != 0) {
printk(KERN_ERR PFX "orinoco_if_add() failed\n");
goto failed;
}


+ 2
- 6
drivers/net/wireless/ray_cs.c View File

@ -321,10 +321,6 @@ static int ray_probe(struct pcmcia_device *p_dev)
p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
p_dev->io.IOAddrLines = 5;
/* Interrupt setup. For PCMCIA, driver takes what's given */
p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
p_dev->irq.Handler = &ray_interrupt;
/* General socket configuration */
p_dev->conf.Attributes = CONF_ENABLE_IRQ;
p_dev->conf.IntType = INT_MEMORY_AND_IO;
@ -417,10 +413,10 @@ static int ray_config(struct pcmcia_device *link)
/* Now allocate an interrupt line. Note that this does not
actually assign a handler to the interrupt.
*/
ret = pcmcia_request_irq(link, &link->irq);
ret = pcmcia_request_irq(link, ray_interrupt);
if (ret)
goto failed;
dev->irq = link->irq.AssignedIRQ;
dev->irq = link->irq;
/* This actually configures the PCMCIA socket -- setting up
the I/O windows and the interrupt mapping.