pcmcia: rework the irq_req_t typedef

Most of the irq_req_t typedef'd struct can be re-worked quite
easily:

(1) IRQInfo2 was unused in any case, so drop it.

(2) IRQInfo1 was used write-only, so drop it.

(3) Instance (private data to be passed to the IRQ handler):
	Most PCMCIA drivers using pcmcia_request_irq() to actually
	register an IRQ handler set the "dev_id" to the same pointer
	as the "priv" pointer in struct pcmcia_device. Modify the two
	exceptions (ipwireless, ibmtr_cs) to also work this waym and
	set the IRQ handler's "dev_id" to p_dev->priv unconditionally.

(4) Handler is to be of type irq_handler_t.

(5) Handler != NULL already tells whether an IRQ handler is present.
	Therefore, we do not need the IRQ_HANDLER_PRESENT flag in
	irq_req_t.Attributes.

CC: netdev@vger.kernel.org
CC: linux-bluetooth@vger.kernel.org
CC: linux-ide@vger.kernel.org
CC: linux-wireless@vger.kernel.org
CC: linux-scsi@vger.kernel.org
CC: alsa-devel@alsa-project.org
CC: Jaroslav Kysela <perex@perex.cz>
CC: Jiri Kosina <jkosina@suse.cz>
CC: Karsten Keil <isdn@linux-pingi.de>
for the Bluetooth parts: Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
This commit is contained in:
Dominik Brodowski 2009-11-08 17:24:46 +01:00
parent dd2e5a1565
commit 5fa9167a1b
54 changed files with 59 additions and 136 deletions

View file

@ -268,7 +268,6 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)
pdev->io.Attributes2 = IO_DATA_PATH_WIDTH_8; pdev->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
pdev->io.IOAddrLines = 3; pdev->io.IOAddrLines = 3;
pdev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; pdev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
pdev->irq.IRQInfo1 = IRQ_LEVEL_ID;
pdev->conf.Attributes = CONF_ENABLE_IRQ; pdev->conf.Attributes = CONF_ENABLE_IRQ;
pdev->conf.IntType = INT_MEMORY_AND_IO; pdev->conf.IntType = INT_MEMORY_AND_IO;

View file

@ -867,11 +867,9 @@ static int bluecard_probe(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
link->io.NumPorts1 = 8; link->io.NumPorts1 = 8;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT; link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = bluecard_interrupt; link->irq.Handler = bluecard_interrupt;
link->irq.Instance = info;
link->conf.Attributes = CONF_ENABLE_IRQ; link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO; link->conf.IntType = INT_MEMORY_AND_IO;

View file

@ -659,11 +659,9 @@ static int bt3c_probe(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
link->io.NumPorts1 = 8; link->io.NumPorts1 = 8;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT; link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = bt3c_interrupt; link->irq.Handler = bt3c_interrupt;
link->irq.Instance = info;
link->conf.Attributes = CONF_ENABLE_IRQ; link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO; link->conf.IntType = INT_MEMORY_AND_IO;

View file

@ -588,11 +588,9 @@ static int btuart_probe(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
link->io.NumPorts1 = 8; link->io.NumPorts1 = 8;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT; link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = btuart_interrupt; link->irq.Handler = btuart_interrupt;
link->irq.Instance = info;
link->conf.Attributes = CONF_ENABLE_IRQ; link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO; link->conf.IntType = INT_MEMORY_AND_IO;

View file

@ -573,11 +573,9 @@ static int dtl1_probe(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
link->io.NumPorts1 = 8; link->io.NumPorts1 = 8;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT; link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = dtl1_interrupt; link->irq.Handler = dtl1_interrupt;
link->irq.Instance = info;
link->conf.Attributes = CONF_ENABLE_IRQ; link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO; link->conf.IntType = INT_MEMORY_AND_IO;

View file

@ -1213,12 +1213,12 @@ static irqreturn_t ipwireless_handle_v2_v3_interrupt(int irq,
irqreturn_t ipwireless_interrupt(int irq, void *dev_id) irqreturn_t ipwireless_interrupt(int irq, void *dev_id)
{ {
struct ipw_hardware *hw = dev_id; struct ipw_dev *ipw = dev_id;
if (hw->hw_version == HW_VERSION_1) if (ipw->hardware->hw_version == HW_VERSION_1)
return ipwireless_handle_v1_interrupt(irq, hw); return ipwireless_handle_v1_interrupt(irq, ipw->hardware);
else else
return ipwireless_handle_v2_v3_interrupt(irq, hw); return ipwireless_handle_v2_v3_interrupt(irq, ipw->hardware);
} }
static void flush_packets_to_hw(struct ipw_hardware *hw) static void flush_packets_to_hw(struct ipw_hardware *hw)

View file

@ -93,8 +93,6 @@ static int ipwireless_probe(struct pcmcia_device *p_dev,
p_dev->io.NumPorts1 = cfg->io.win[0].len; p_dev->io.NumPorts1 = cfg->io.win[0].len;
p_dev->io.IOAddrLines = 16; p_dev->io.IOAddrLines = 16;
p_dev->irq.IRQInfo1 = cfg->irq.IRQInfo1;
/* 0x40 causes it to generate level mode interrupts. */ /* 0x40 causes it to generate level mode interrupts. */
/* 0x04 enables IREQ pin. */ /* 0x04 enables IREQ pin. */
p_dev->conf.ConfigIndex = cfg->index | 0x44; p_dev->conf.ConfigIndex = cfg->index | 0x44;
@ -197,9 +195,8 @@ static int config_ipwireless(struct ipw_dev *ipw)
link->conf.Attributes = CONF_ENABLE_IRQ; link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO; link->conf.IntType = INT_MEMORY_AND_IO;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT; link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = ipwireless_interrupt; link->irq.Handler = ipwireless_interrupt;
link->irq.Instance = ipw->hardware;
INIT_WORK(&ipw->work_reboot, signalled_reboot_work); INIT_WORK(&ipw->work_reboot, signalled_reboot_work);
@ -315,7 +312,6 @@ static int ipwireless_attach(struct pcmcia_device *link)
ipw->link = link; ipw->link = link;
link->priv = ipw; link->priv = ipw;
link->irq.Instance = ipw;
/* Link this device into our device list. */ /* Link this device into our device list. */
link->dev_node = &ipw->nodes[0]; link->dev_node = &ipw->nodes[0];

View file

@ -554,7 +554,6 @@ static int mgslpc_probe(struct pcmcia_device *link)
/* Interrupt setup */ /* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = NULL; link->irq.Handler = NULL;
link->conf.Attributes = 0; link->conf.Attributes = 0;
@ -609,9 +608,7 @@ static int mgslpc_config(struct pcmcia_device *link)
link->conf.ConfigIndex = 8; link->conf.ConfigIndex = 8;
link->conf.Present = PRESENT_OPTION; link->conf.Present = PRESENT_OPTION;
link->irq.Attributes |= IRQ_HANDLE_PRESENT;
link->irq.Handler = mgslpc_isr; link->irq.Handler = mgslpc_isr;
link->irq.Instance = info;
ret = pcmcia_request_irq(link, &link->irq); ret = pcmcia_request_irq(link, &link->irq);
if (ret) if (ret)

View file

@ -103,7 +103,6 @@ static int ide_probe(struct pcmcia_device *link)
link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
link->io.IOAddrLines = 3; link->io.IOAddrLines = 3;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->conf.Attributes = CONF_ENABLE_IRQ; link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO; link->conf.IntType = INT_MEMORY_AND_IO;

View file

@ -111,8 +111,6 @@ static int avmcs_probe(struct pcmcia_device *p_dev)
p_dev->irq.Attributes = IRQ_TYPE_EXCLUSIVE; p_dev->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED;
p_dev->irq.IRQInfo1 = IRQ_LEVEL_ID;
/* General socket configuration */ /* General socket configuration */
p_dev->conf.Attributes = CONF_ENABLE_IRQ; p_dev->conf.Attributes = CONF_ENABLE_IRQ;
p_dev->conf.IntType = INT_MEMORY_AND_IO; p_dev->conf.IntType = INT_MEMORY_AND_IO;

View file

@ -123,8 +123,6 @@ static int avma1cs_probe(struct pcmcia_device *p_dev)
p_dev->irq.Attributes = IRQ_TYPE_EXCLUSIVE; p_dev->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED;
p_dev->irq.IRQInfo1 = IRQ_LEVEL_ID;
/* General socket configuration */ /* General socket configuration */
p_dev->conf.Attributes = CONF_ENABLE_IRQ; p_dev->conf.Attributes = CONF_ENABLE_IRQ;
p_dev->conf.IntType = INT_MEMORY_AND_IO; p_dev->conf.IntType = INT_MEMORY_AND_IO;

View file

@ -138,7 +138,6 @@ static int elsa_cs_probe(struct pcmcia_device *link)
/* Interrupt setup */ /* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED;
link->irq.IRQInfo1 = IRQ_LEVEL_ID|IRQ_SHARE_ID;
link->irq.Handler = NULL; link->irq.Handler = NULL;
/* /*

View file

@ -145,7 +145,6 @@ static int sedlbauer_probe(struct pcmcia_device *link)
/* Interrupt setup */ /* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = NULL; link->irq.Handler = NULL;
/* /*

View file

@ -128,7 +128,6 @@ static int teles_probe(struct pcmcia_device *link)
/* Interrupt setup */ /* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED;
link->irq.IRQInfo1 = IRQ_LEVEL_ID|IRQ_SHARE_ID;
link->irq.Handler = NULL; link->irq.Handler = NULL;
/* /*

View file

@ -283,10 +283,8 @@ static int tc574_probe(struct pcmcia_device *link)
spin_lock_init(&lp->window_lock); spin_lock_init(&lp->window_lock);
link->io.NumPorts1 = 32; link->io.NumPorts1 = 32;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_16; link->io.Attributes1 = IO_DATA_PATH_WIDTH_16;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_HANDLE_PRESENT; link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = &el3_interrupt; link->irq.Handler = &el3_interrupt;
link->irq.Instance = dev;
link->conf.Attributes = CONF_ENABLE_IRQ; link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO; link->conf.IntType = INT_MEMORY_AND_IO;
link->conf.ConfigIndex = 1; link->conf.ConfigIndex = 1;

View file

@ -194,10 +194,8 @@ static int tc589_probe(struct pcmcia_device *link)
spin_lock_init(&lp->lock); spin_lock_init(&lp->lock);
link->io.NumPorts1 = 16; link->io.NumPorts1 = 16;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_16; link->io.Attributes1 = IO_DATA_PATH_WIDTH_16;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_HANDLE_PRESENT; link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = &el3_interrupt; link->irq.Handler = &el3_interrupt;
link->irq.Instance = dev;
link->conf.Attributes = CONF_ENABLE_IRQ; link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO; link->conf.IntType = INT_MEMORY_AND_IO;
link->conf.ConfigIndex = 1; link->conf.ConfigIndex = 1;

View file

@ -170,7 +170,6 @@ static int axnet_probe(struct pcmcia_device *link)
info->p_dev = link; info->p_dev = link;
link->priv = dev; link->priv = dev;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->conf.Attributes = CONF_ENABLE_IRQ; link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO; link->conf.IntType = INT_MEMORY_AND_IO;

View file

@ -164,11 +164,10 @@ static int com20020_probe(struct pcmcia_device *p_dev)
p_dev->io.NumPorts1 = 16; p_dev->io.NumPorts1 = 16;
p_dev->io.IOAddrLines = 16; p_dev->io.IOAddrLines = 16;
p_dev->irq.Attributes = IRQ_TYPE_EXCLUSIVE; p_dev->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
p_dev->irq.IRQInfo1 = IRQ_LEVEL_ID;
p_dev->conf.Attributes = CONF_ENABLE_IRQ; p_dev->conf.Attributes = CONF_ENABLE_IRQ;
p_dev->conf.IntType = INT_MEMORY_AND_IO; p_dev->conf.IntType = INT_MEMORY_AND_IO;
p_dev->irq.Instance = info->dev = dev; info->dev = dev;
p_dev->priv = info; p_dev->priv = info;
return com20020_config(p_dev); return com20020_config(p_dev);
@ -275,9 +274,8 @@ static int com20020_config(struct pcmcia_device *link)
ioaddr = dev->base_addr = link->io.BasePort1; ioaddr = dev->base_addr = link->io.BasePort1;
dev_dbg(&link->dev, "got ioaddr %Xh\n", ioaddr); dev_dbg(&link->dev, "got ioaddr %Xh\n", ioaddr);
dev_dbg(&link->dev, "request IRQ %d (%Xh/%Xh)\n", dev_dbg(&link->dev, "request IRQ %d\n",
link->irq.AssignedIRQ, link->irq.AssignedIRQ);
link->irq.IRQInfo1, link->irq.IRQInfo2);
i = pcmcia_request_irq(link, &link->irq); i = pcmcia_request_irq(link, &link->irq);
if (i != 0) if (i != 0)
{ {

View file

@ -255,10 +255,8 @@ static int fmvj18x_probe(struct pcmcia_device *link)
link->io.IOAddrLines = 5; link->io.IOAddrLines = 5;
/* Interrupt setup */ /* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_HANDLE_PRESENT; link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = &fjn_interrupt; link->irq.Handler = &fjn_interrupt;
link->irq.Instance = dev;
/* General socket configuration */ /* General socket configuration */
link->conf.Attributes = CONF_ENABLE_IRQ; link->conf.Attributes = CONF_ENABLE_IRQ;
@ -428,7 +426,7 @@ static int fmvj18x_config(struct pcmcia_device *link)
if (link->io.NumPorts2 != 0) { if (link->io.NumPorts2 != 0) {
link->irq.Attributes = link->irq.Attributes =
IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED|IRQ_HANDLE_PRESENT; IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED;
ret = mfc_try_io_port(link); ret = mfc_try_io_port(link);
if (ret != 0) goto failed; if (ret != 0) goto failed;
} else if (cardtype == UNGERMANN) { } else if (cardtype == UNGERMANN) {

View file

@ -119,6 +119,12 @@ static const struct ethtool_ops netdev_ethtool_ops = {
.get_drvinfo = netdev_get_drvinfo, .get_drvinfo = netdev_get_drvinfo,
}; };
static irqreturn_t ibmtr_interrupt(int irq, void *dev_id) {
ibmtr_dev_t *info = dev_id;
struct net_device *dev = info->dev;
return tok_interrupt(irq, dev);
};
/*====================================================================== /*======================================================================
ibmtr_attach() creates an "instance" of the driver, allocating ibmtr_attach() creates an "instance" of the driver, allocating
@ -150,14 +156,13 @@ static int __devinit ibmtr_attach(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
link->io.NumPorts1 = 4; link->io.NumPorts1 = 4;
link->io.IOAddrLines = 16; link->io.IOAddrLines = 16;
link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT; link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
link->irq.IRQInfo1 = IRQ_LEVEL_ID; link->irq.Handler = ibmtr_interrupt;
link->irq.Handler = &tok_interrupt;
link->conf.Attributes = CONF_ENABLE_IRQ; link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO; link->conf.IntType = INT_MEMORY_AND_IO;
link->conf.Present = PRESENT_OPTION; link->conf.Present = PRESENT_OPTION;
link->irq.Instance = info->dev = dev; info->dev = dev;
SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);

View file

@ -463,10 +463,8 @@ static int nmclan_probe(struct pcmcia_device *link)
link->io.NumPorts1 = 32; link->io.NumPorts1 = 32;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
link->io.IOAddrLines = 5; link->io.IOAddrLines = 5;
link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT; link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = &mace_interrupt; link->irq.Handler = &mace_interrupt;
link->irq.Instance = dev;
link->conf.Attributes = CONF_ENABLE_IRQ; link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO; link->conf.IntType = INT_MEMORY_AND_IO;
link->conf.ConfigIndex = 1; link->conf.ConfigIndex = 1;

View file

@ -266,7 +266,6 @@ static int pcnet_probe(struct pcmcia_device *link)
link->priv = dev; link->priv = dev;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->conf.Attributes = CONF_ENABLE_IRQ; link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO; link->conf.IntType = INT_MEMORY_AND_IO;

View file

@ -329,10 +329,8 @@ static int smc91c92_probe(struct pcmcia_device *link)
link->io.NumPorts1 = 16; link->io.NumPorts1 = 16;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
link->io.IOAddrLines = 4; link->io.IOAddrLines = 4;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_HANDLE_PRESENT; link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = &smc_interrupt; link->irq.Handler = &smc_interrupt;
link->irq.Instance = dev;
link->conf.Attributes = CONF_ENABLE_IRQ; link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO; link->conf.IntType = INT_MEMORY_AND_IO;
@ -456,7 +454,7 @@ static int mhz_mfc_config(struct pcmcia_device *link)
link->conf.Attributes |= CONF_ENABLE_SPKR; link->conf.Attributes |= CONF_ENABLE_SPKR;
link->conf.Status = CCSR_AUDIO_ENA; link->conf.Status = CCSR_AUDIO_ENA;
link->irq.Attributes = link->irq.Attributes =
IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED|IRQ_HANDLE_PRESENT; IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED;
link->io.IOAddrLines = 16; link->io.IOAddrLines = 16;
link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
link->io.NumPorts2 = 8; link->io.NumPorts2 = 8;
@ -655,7 +653,7 @@ static int osi_config(struct pcmcia_device *link)
link->conf.Attributes |= CONF_ENABLE_SPKR; link->conf.Attributes |= CONF_ENABLE_SPKR;
link->conf.Status = CCSR_AUDIO_ENA; link->conf.Status = CCSR_AUDIO_ENA;
link->irq.Attributes = link->irq.Attributes =
IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED|IRQ_HANDLE_PRESENT; IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED;
link->io.NumPorts1 = 64; link->io.NumPorts1 = 64;
link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
link->io.NumPorts2 = 8; link->io.NumPorts2 = 8;

View file

@ -556,7 +556,6 @@ xirc2ps_probe(struct pcmcia_device *link)
link->conf.IntType = INT_MEMORY_AND_IO; link->conf.IntType = INT_MEMORY_AND_IO;
link->conf.ConfigIndex = 1; link->conf.ConfigIndex = 1;
link->irq.Handler = xirc2ps_interrupt; link->irq.Handler = xirc2ps_interrupt;
link->irq.Instance = dev;
/* Fill in card specific entries */ /* Fill in card specific entries */
dev->netdev_ops = &netdev_ops; dev->netdev_ops = &netdev_ops;
@ -835,8 +834,6 @@ xirc2ps_config(struct pcmcia_device * link)
link->io.IOAddrLines =10; link->io.IOAddrLines =10;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_16; link->io.Attributes1 = IO_DATA_PATH_WIDTH_16;
link->irq.Attributes = IRQ_HANDLE_PRESENT;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
if (local->modem) { if (local->modem) {
int pass; int pass;

View file

@ -134,7 +134,6 @@ static int airo_probe(struct pcmcia_device *p_dev)
/* Interrupt setup */ /* Interrupt setup */
p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
p_dev->irq.IRQInfo1 = IRQ_LEVEL_ID;
p_dev->irq.Handler = NULL; p_dev->irq.Handler = NULL;
/* /*

View file

@ -143,7 +143,6 @@ static int atmel_probe(struct pcmcia_device *p_dev)
/* Interrupt setup */ /* Interrupt setup */
p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
p_dev->irq.IRQInfo1 = IRQ_LEVEL_ID;
p_dev->irq.Handler = NULL; p_dev->irq.Handler = NULL;
/* /*

View file

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

View file

@ -641,11 +641,8 @@ static int prism2_config(struct pcmcia_device *link)
* irq structure is initialized. * irq structure is initialized.
*/ */
if (link->conf.Attributes & CONF_ENABLE_IRQ) { if (link->conf.Attributes & CONF_ENABLE_IRQ) {
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
IRQ_HANDLE_PRESENT;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = prism2_interrupt; link->irq.Handler = prism2_interrupt;
link->irq.Instance = dev;
ret = pcmcia_request_irq(link, &link->irq); ret = pcmcia_request_irq(link, &link->irq);
if (ret) if (ret)
goto failed; goto failed;

View file

@ -837,7 +837,6 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
p_dev->irq.Handler = NULL; p_dev->irq.Handler = NULL;
p_dev->irq.IRQInfo1 = IRQ_INFO2_VALID | IRQ_LEVEL_ID;
p_dev->conf.Attributes = 0; p_dev->conf.Attributes = 0;
p_dev->conf.IntType = INT_MEMORY_AND_IO; p_dev->conf.IntType = INT_MEMORY_AND_IO;

View file

@ -384,8 +384,7 @@ static int netwave_probe(struct pcmcia_device *link)
link->io.IOAddrLines = 5; link->io.IOAddrLines = 5;
/* Interrupt setup */ /* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT; link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = &netwave_interrupt; link->irq.Handler = &netwave_interrupt;
/* General socket configuration */ /* General socket configuration */
@ -404,8 +403,6 @@ static int netwave_probe(struct pcmcia_device *link)
dev->watchdog_timeo = TX_TIMEOUT; dev->watchdog_timeo = TX_TIMEOUT;
link->irq.Instance = dev;
return netwave_pcmcia_config( link); return netwave_pcmcia_config( link);
} /* netwave_attach */ } /* netwave_attach */

View file

@ -120,10 +120,8 @@ orinoco_cs_probe(struct pcmcia_device *link)
link->priv = priv; link->priv = priv;
/* Interrupt setup */ /* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT; link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = orinoco_interrupt; link->irq.Handler = orinoco_interrupt;
link->irq.Instance = priv;
/* General socket configuration defaults can go here. In this /* General socket configuration defaults can go here. In this
* client, we assume very little, and rely on the CIS for * client, we assume very little, and rely on the CIS for

View file

@ -194,10 +194,8 @@ spectrum_cs_probe(struct pcmcia_device *link)
link->priv = priv; link->priv = priv;
/* Interrupt setup */ /* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT; link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = orinoco_interrupt; link->irq.Handler = orinoco_interrupt;
link->irq.Instance = priv;
/* General socket configuration defaults can go here. In this /* General socket configuration defaults can go here. In this
* client, we assume very little, and rely on the CIS for * client, we assume very little, and rely on the CIS for

View file

@ -323,8 +323,7 @@ static int ray_probe(struct pcmcia_device *p_dev)
p_dev->io.IOAddrLines = 5; p_dev->io.IOAddrLines = 5;
/* Interrupt setup. For PCMCIA, driver takes what's given */ /* Interrupt setup. For PCMCIA, driver takes what's given */
p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT; p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
p_dev->irq.IRQInfo1 = IRQ_LEVEL_ID;
p_dev->irq.Handler = &ray_interrupt; p_dev->irq.Handler = &ray_interrupt;
/* General socket configuration */ /* General socket configuration */
@ -333,7 +332,6 @@ static int ray_probe(struct pcmcia_device *p_dev)
p_dev->conf.ConfigIndex = 1; p_dev->conf.ConfigIndex = 1;
p_dev->priv = dev; p_dev->priv = dev;
p_dev->irq.Instance = dev;
local->finder = p_dev; local->finder = p_dev;
local->card_status = CARD_INSERTED; local->card_status = CARD_INSERTED;

View file

@ -4438,8 +4438,7 @@ wavelan_probe(struct pcmcia_device *p_dev)
p_dev->io.IOAddrLines = 3; p_dev->io.IOAddrLines = 3;
/* Interrupt setup */ /* Interrupt setup */
p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT; p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
p_dev->irq.IRQInfo1 = IRQ_LEVEL_ID;
p_dev->irq.Handler = wavelan_interrupt; p_dev->irq.Handler = wavelan_interrupt;
/* General socket configuration */ /* General socket configuration */
@ -4451,7 +4450,7 @@ wavelan_probe(struct pcmcia_device *p_dev)
if (!dev) if (!dev)
return -ENOMEM; return -ENOMEM;
p_dev->priv = p_dev->irq.Instance = dev; p_dev->priv = dev;
lp = netdev_priv(dev); lp = netdev_priv(dev);

View file

@ -1898,8 +1898,7 @@ static int wl3501_probe(struct pcmcia_device *p_dev)
p_dev->io.IOAddrLines = 5; p_dev->io.IOAddrLines = 5;
/* Interrupt setup */ /* Interrupt setup */
p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT; p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
p_dev->irq.IRQInfo1 = IRQ_LEVEL_ID;
p_dev->irq.Handler = wl3501_interrupt; p_dev->irq.Handler = wl3501_interrupt;
/* General socket configuration */ /* General socket configuration */
@ -1922,7 +1921,7 @@ static int wl3501_probe(struct pcmcia_device *p_dev)
dev->wireless_handlers = &wl3501_handler_def; dev->wireless_handlers = &wl3501_handler_def;
SET_ETHTOOL_OPS(dev, &ops); SET_ETHTOOL_OPS(dev, &ops);
netif_stop_queue(dev); netif_stop_queue(dev);
p_dev->priv = p_dev->irq.Instance = dev; p_dev->priv = dev;
return wl3501_config(p_dev); return wl3501_config(p_dev);
out_link: out_link:

View file

@ -106,7 +106,6 @@ static int parport_probe(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->conf.Attributes = CONF_ENABLE_IRQ; link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO; link->conf.IntType = INT_MEMORY_AND_IO;

View file

@ -383,8 +383,8 @@ static int pcmcia_release_irq(struct pcmcia_device *p_dev, irq_req_t *req)
s->irq.AssignedIRQ = 0; s->irq.AssignedIRQ = 0;
} }
if (req->Attributes & IRQ_HANDLE_PRESENT) { if (req->Handler) {
free_irq(req->AssignedIRQ, req->Instance); free_irq(req->AssignedIRQ, p_dev->priv);
} }
#ifdef CONFIG_PCMCIA_PROBE #ifdef CONFIG_PCMCIA_PROBE
@ -664,7 +664,7 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req)
/* if the underlying IRQ infrastructure allows for it, only allocate /* if the underlying IRQ infrastructure allows for it, only allocate
* the IRQ, but do not enable it * the IRQ, but do not enable it
*/ */
if (!(req->Attributes & IRQ_HANDLE_PRESENT)) if (!(req->Handler))
type |= IRQ_NOAUTOEN; type |= IRQ_NOAUTOEN;
#endif /* IRQ_NOAUTOEN */ #endif /* IRQ_NOAUTOEN */
@ -674,7 +674,7 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req)
} else { } else {
int try; int try;
u32 mask = s->irq_mask; u32 mask = s->irq_mask;
void *data = &p_dev->dev.driver; /* something unique to this device */ void *data = p_dev; /* something unique to this device */
for (try = 0; try < 64; try++) { for (try = 0; try < 64; try++) {
irq = try % 32; irq = try % 32;
@ -691,12 +691,12 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req)
* registering a dummy handle works, i.e. if the IRQ isn't * registering a dummy handle works, i.e. if the IRQ isn't
* marked as used by the kernel resource management core */ * marked as used by the kernel resource management core */
ret = request_irq(irq, ret = request_irq(irq,
(req->Attributes & IRQ_HANDLE_PRESENT) ? req->Handler : test_action, (req->Handler) ? req->Handler : test_action,
type, type,
p_dev->devname, p_dev->devname,
(req->Attributes & IRQ_HANDLE_PRESENT) ? req->Instance : data); (req->Handler) ? p_dev->priv : data);
if (!ret) { if (!ret) {
if (!(req->Attributes & IRQ_HANDLE_PRESENT)) if (!req->Handler)
free_irq(irq, data); free_irq(irq, data);
break; break;
} }
@ -713,9 +713,9 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req)
irq = s->pci_irq; irq = s->pci_irq;
} }
if (ret && (req->Attributes & IRQ_HANDLE_PRESENT)) { if (ret && req->Handler) {
ret = request_irq(irq, req->Handler, type, ret = request_irq(irq, req->Handler, type,
p_dev->devname, req->Instance); p_dev->devname, p_dev->priv);
if (ret) { if (ret) {
dev_printk(KERN_INFO, &s->dev, dev_printk(KERN_INFO, &s->dev,
"request_irq() failed\n"); "request_irq() failed\n");

View file

@ -106,7 +106,6 @@ static int aha152x_probe(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
link->io.IOAddrLines = 10; link->io.IOAddrLines = 10;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->conf.Attributes = CONF_ENABLE_IRQ; link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO; link->conf.IntType = INT_MEMORY_AND_IO;
link->conf.Present = PRESENT_OPTION; link->conf.Present = PRESENT_OPTION;

View file

@ -89,7 +89,6 @@ static int fdomain_probe(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
link->io.IOAddrLines = 10; link->io.IOAddrLines = 10;
link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->conf.Attributes = CONF_ENABLE_IRQ; link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO; link->conf.IntType = INT_MEMORY_AND_IO;
link->conf.Present = PRESENT_OPTION; link->conf.Present = PRESENT_OPTION;

View file

@ -1564,12 +1564,10 @@ static int nsp_cs_probe(struct pcmcia_device *link)
link->io.IOAddrLines = 10; /* not used */ link->io.IOAddrLines = 10; /* not used */
/* Interrupt setup */ /* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT; link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
/* Interrupt handler */ /* Interrupt handler */
link->irq.Handler = &nspintr; link->irq.Handler = &nspintr;
link->irq.Instance = info;
link->irq.Attributes |= IRQF_SHARED; link->irq.Attributes |= IRQF_SHARED;
/* General socket configuration */ /* General socket configuration */

View file

@ -162,7 +162,6 @@ static int qlogic_probe(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
link->io.IOAddrLines = 10; link->io.IOAddrLines = 10;
link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->conf.Attributes = CONF_ENABLE_IRQ; link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO; link->conf.IntType = INT_MEMORY_AND_IO;
link->conf.Present = PRESENT_OPTION; link->conf.Present = PRESENT_OPTION;

View file

@ -867,7 +867,6 @@ SYM53C500_probe(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
link->io.IOAddrLines = 10; link->io.IOAddrLines = 10;
link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->conf.Attributes = CONF_ENABLE_IRQ; link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO; link->conf.IntType = INT_MEMORY_AND_IO;

View file

@ -334,7 +334,6 @@ static int serial_probe(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
link->io.NumPorts1 = 8; link->io.NumPorts1 = 8;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->conf.Attributes = CONF_ENABLE_IRQ; link->conf.Attributes = CONF_ENABLE_IRQ;
if (do_sound) { if (do_sound) {
link->conf.Attributes |= CONF_ENABLE_SPKR; link->conf.Attributes |= CONF_ENABLE_SPKR;

View file

@ -703,7 +703,6 @@ static int das16cs_pcmcia_attach(struct pcmcia_device *link)
/* Initialize the pcmcia_device structure */ /* Initialize the pcmcia_device structure */
/* Interrupt setup */ /* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = NULL; link->irq.Handler = NULL;
link->conf.Attributes = 0; link->conf.Attributes = 0;

View file

@ -173,7 +173,6 @@ static int das08_pcmcia_attach(struct pcmcia_device *link)
/* Interrupt setup */ /* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = NULL; link->irq.Handler = NULL;
/* /*

View file

@ -503,7 +503,6 @@ static int dio700_cs_attach(struct pcmcia_device *link)
/* Interrupt setup */ /* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = NULL; link->irq.Handler = NULL;
/* /*

View file

@ -254,7 +254,6 @@ static int dio24_cs_attach(struct pcmcia_device *link)
/* Interrupt setup */ /* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = NULL; link->irq.Handler = NULL;
/* /*

View file

@ -230,7 +230,6 @@ static int labpc_cs_attach(struct pcmcia_device *link)
/* Interrupt setup */ /* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_FORCED_PULSE; link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_FORCED_PULSE;
link->irq.IRQInfo1 = IRQ_INFO2_VALID | IRQ_PULSE_ID;
link->irq.Handler = NULL; link->irq.Handler = NULL;
/* /*

View file

@ -274,7 +274,6 @@ static int cs_attach(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_16; link->io.Attributes1 = IO_DATA_PATH_WIDTH_16;
link->io.NumPorts1 = 16; link->io.NumPorts1 = 16;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->conf.Attributes = CONF_ENABLE_IRQ; link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO; link->conf.IntType = INT_MEMORY_AND_IO;
@ -325,9 +324,6 @@ static int mio_pcmcia_config_loop(struct pcmcia_device *p_dev,
p_dev->io.IOAddrLines = cfg->io.flags & CISTPL_IO_LINES_MASK; p_dev->io.IOAddrLines = cfg->io.flags & CISTPL_IO_LINES_MASK;
p_dev->io.NumPorts2 = 0; p_dev->io.NumPorts2 = 0;
p_dev->irq.IRQInfo1 = cfg->irq.IRQInfo1;
p_dev->irq.IRQInfo2 = cfg->irq.IRQInfo2;
for (base = 0x000; base < 0x400; base += 0x20) { for (base = 0x000; base < 0x400; base += 0x20) {
p_dev->io.BasePort1 = base; p_dev->io.BasePort1 = base;
ret = pcmcia_request_io(p_dev, &p_dev->io); ret = pcmcia_request_io(p_dev, &p_dev->io);

View file

@ -1041,10 +1041,8 @@ static int daqp_cs_attach(struct pcmcia_device *link)
link->priv = local; link->priv = local;
/* Interrupt setup */ /* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT; link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = daqp_interrupt; link->irq.Handler = daqp_interrupt;
link->irq.Instance = local;
/* /*
General socket configuration defaults can go here. In this General socket configuration defaults can go here. In this

View file

@ -243,7 +243,6 @@ static int sl811_cs_probe(struct pcmcia_device *link)
/* Initialize */ /* Initialize */
link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
link->irq.IRQInfo1 = IRQ_INFO2_VALID|IRQ_LEVEL_ID;
link->irq.Handler = NULL; link->irq.Handler = NULL;
link->conf.Attributes = 0; link->conf.Attributes = 0;

View file

@ -15,6 +15,10 @@
#ifndef _LINUX_CS_H #ifndef _LINUX_CS_H
#define _LINUX_CS_H #define _LINUX_CS_H
#ifdef __KERNEL__
#include <linux/interrupt.h>
#endif
/* For AccessConfigurationRegister */ /* For AccessConfigurationRegister */
typedef struct conf_reg_t { typedef struct conf_reg_t {
u_char Function; u_char Function;
@ -111,11 +115,9 @@ typedef struct io_req_t {
/* For RequestIRQ and ReleaseIRQ */ /* For RequestIRQ and ReleaseIRQ */
typedef struct irq_req_t { typedef struct irq_req_t {
u_int Attributes; u_int Attributes;
u_int AssignedIRQ; u_int AssignedIRQ;
u_int IRQInfo1, IRQInfo2; /* IRQInfo2 is ignored */ irq_handler_t Handler;
void *Handler;
void *Instance;
} irq_req_t; } irq_req_t;
/* Attributes for RequestIRQ and ReleaseIRQ */ /* Attributes for RequestIRQ and ReleaseIRQ */
@ -125,7 +127,7 @@ typedef struct irq_req_t {
#define IRQ_TYPE_DYNAMIC_SHARING 0x02 #define IRQ_TYPE_DYNAMIC_SHARING 0x02
#define IRQ_FORCED_PULSE 0x04 #define IRQ_FORCED_PULSE 0x04
#define IRQ_FIRST_SHARED 0x08 #define IRQ_FIRST_SHARED 0x08
#define IRQ_HANDLE_PRESENT 0x10 //#define IRQ_HANDLE_PRESENT 0x10
#define IRQ_PULSE_ALLOCATED 0x100 #define IRQ_PULSE_ALLOCATED 0x100
/* Bits in IRQInfo1 field */ /* Bits in IRQInfo1 field */

View file

@ -142,12 +142,10 @@ static int snd_pdacf_probe(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
link->io.NumPorts1 = 16; link->io.NumPorts1 = 16;
link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT | IRQ_FORCED_PULSE; link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_FORCED_PULSE;
// link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; // link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED;
link->irq.IRQInfo1 = 0 /* | IRQ_LEVEL_ID */;
link->irq.Handler = pdacf_interrupt; link->irq.Handler = pdacf_interrupt;
link->irq.Instance = pdacf;
link->conf.Attributes = CONF_ENABLE_IRQ; link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO; link->conf.IntType = INT_MEMORY_AND_IO;
link->conf.ConfigIndex = 1; link->conf.ConfigIndex = 1;

View file

@ -161,11 +161,9 @@ static int snd_vxpocket_new(struct snd_card *card, int ibl,
link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
link->io.NumPorts1 = 16; link->io.NumPorts1 = 16;
link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT; link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = &snd_vx_irq_handler; link->irq.Handler = &snd_vx_irq_handler;
link->irq.Instance = chip;
link->conf.Attributes = CONF_ENABLE_IRQ; link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO; link->conf.IntType = INT_MEMORY_AND_IO;