diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-03-07 04:58:29 -0500 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-05-10 04:23:12 -0400 |
commit | a7debe789dfcaee9c4d81e5738b0be8c5d93930b (patch) | |
tree | 669288850cb74591fc95f4de0cb98121e399ae09 | |
parent | 6f840afb416748c15cf55c19b45c4870554c3af1 (diff) |
pcmcia: pass FORCED_PULSE parameter in pcmcia_request_configuration()
As it's only used there it makes no sense relying on pcmcia_request_irq().
CC: alsa-devel@alsa-project.org
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
-rw-r--r-- | drivers/pcmcia/pcmcia_resource.c | 11 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/ni_labpc_cs.c | 5 | ||||
-rw-r--r-- | include/pcmcia/cs.h | 1 | ||||
-rw-r--r-- | sound/pcmcia/pdaudiocf/pdaudiocf.c | 6 |
4 files changed, 10 insertions, 13 deletions
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index cefc4cda9d3e..8dce223f3f44 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c | |||
@@ -426,10 +426,6 @@ static int pcmcia_release_irq(struct pcmcia_device *p_dev, irq_req_t *req) | |||
426 | if (c->state & CONFIG_LOCKED) | 426 | if (c->state & CONFIG_LOCKED) |
427 | goto out; | 427 | goto out; |
428 | 428 | ||
429 | if (c->irq.Attributes != req->Attributes) { | ||
430 | dev_dbg(&s->dev, "IRQ attributes must match assigned ones\n"); | ||
431 | goto out; | ||
432 | } | ||
433 | if (s->pcmcia_irq != req->AssignedIRQ) { | 429 | if (s->pcmcia_irq != req->AssignedIRQ) { |
434 | dev_dbg(&s->dev, "IRQ must match assigned one\n"); | 430 | dev_dbg(&s->dev, "IRQ must match assigned one\n"); |
435 | goto out; | 431 | goto out; |
@@ -553,9 +549,9 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev, | |||
553 | if (req->Present & PRESENT_IOBASE_0) | 549 | if (req->Present & PRESENT_IOBASE_0) |
554 | c->Option |= COR_ADDR_DECODE; | 550 | c->Option |= COR_ADDR_DECODE; |
555 | } | 551 | } |
556 | if (req->Attributes & CONF_ENABLE_IRQ) | 552 | if ((req->Attributes & CONF_ENABLE_IRQ) && |
557 | if (!(c->irq.Attributes & IRQ_FORCED_PULSE)) | 553 | !(req->Attributes & CONF_ENABLE_PULSE_IRQ)) |
558 | c->Option |= COR_LEVEL_REQ; | 554 | c->Option |= COR_LEVEL_REQ; |
559 | pcmcia_write_cis_mem(s, 1, (base + CISREG_COR)>>1, 1, &c->Option); | 555 | pcmcia_write_cis_mem(s, 1, (base + CISREG_COR)>>1, 1, &c->Option); |
560 | mdelay(40); | 556 | mdelay(40); |
561 | } | 557 | } |
@@ -730,7 +726,6 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req) | |||
730 | } | 726 | } |
731 | } | 727 | } |
732 | 728 | ||
733 | c->irq.Attributes = req->Attributes; | ||
734 | req->AssignedIRQ = irq; | 729 | req->AssignedIRQ = irq; |
735 | 730 | ||
736 | p_dev->_irq = 1; | 731 | p_dev->_irq = 1; |
diff --git a/drivers/staging/comedi/drivers/ni_labpc_cs.c b/drivers/staging/comedi/drivers/ni_labpc_cs.c index 8ad1055a5cc1..6e4ed0d9105a 100644 --- a/drivers/staging/comedi/drivers/ni_labpc_cs.c +++ b/drivers/staging/comedi/drivers/ni_labpc_cs.c | |||
@@ -230,7 +230,7 @@ static int labpc_cs_attach(struct pcmcia_device *link) | |||
230 | link->priv = local; | 230 | link->priv = local; |
231 | 231 | ||
232 | /* Interrupt setup */ | 232 | /* Interrupt setup */ |
233 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_FORCED_PULSE; | 233 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; |
234 | link->irq.Handler = NULL; | 234 | link->irq.Handler = NULL; |
235 | 235 | ||
236 | /* | 236 | /* |
@@ -307,7 +307,8 @@ static int labpc_pcmcia_config_loop(struct pcmcia_device *p_dev, | |||
307 | 307 | ||
308 | /* Do we need to allocate an interrupt? */ | 308 | /* Do we need to allocate an interrupt? */ |
309 | if (cfg->irq.IRQInfo1 || dflt->irq.IRQInfo1) | 309 | if (cfg->irq.IRQInfo1 || dflt->irq.IRQInfo1) |
310 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; | 310 | p_dev->conf.Attributes |= |
311 | (CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ); | ||
311 | 312 | ||
312 | /* IO window settings */ | 313 | /* IO window settings */ |
313 | p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; | 314 | p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; |
diff --git a/include/pcmcia/cs.h b/include/pcmcia/cs.h index 75fa3530345b..af615716dc23 100644 --- a/include/pcmcia/cs.h +++ b/include/pcmcia/cs.h | |||
@@ -85,6 +85,7 @@ typedef struct config_req_t { | |||
85 | #define CONF_ENABLE_IRQ 0x01 | 85 | #define CONF_ENABLE_IRQ 0x01 |
86 | #define CONF_ENABLE_DMA 0x02 | 86 | #define CONF_ENABLE_DMA 0x02 |
87 | #define CONF_ENABLE_SPKR 0x04 | 87 | #define CONF_ENABLE_SPKR 0x04 |
88 | #define CONF_ENABLE_PULSE_IRQ 0x08 | ||
88 | #define CONF_VALID_CLIENT 0x100 | 89 | #define CONF_VALID_CLIENT 0x100 |
89 | 90 | ||
90 | /* IntType field */ | 91 | /* IntType field */ |
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c index edaa729126bb..dcf85390c5f9 100644 --- a/sound/pcmcia/pdaudiocf/pdaudiocf.c +++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c | |||
@@ -142,12 +142,12 @@ 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 | IRQ_FORCED_PULSE; | 145 | link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; |
146 | /* FIXME: This driver should be updated to allow for dynamic IRQ sharing */ | 146 | /* FIXME: This driver should be updated to allow for dynamic IRQ sharing */ |
147 | /* link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_FORCED_PULSE; */ | 147 | /* link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; */ |
148 | 148 | ||
149 | link->irq.Handler = pdacf_interrupt; | 149 | link->irq.Handler = pdacf_interrupt; |
150 | link->conf.Attributes = CONF_ENABLE_IRQ; | 150 | link->conf.Attributes = CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ; |
151 | link->conf.IntType = INT_MEMORY_AND_IO; | 151 | link->conf.IntType = INT_MEMORY_AND_IO; |
152 | link->conf.ConfigIndex = 1; | 152 | link->conf.ConfigIndex = 1; |
153 | link->conf.Present = PRESENT_OPTION; | 153 | link->conf.Present = PRESENT_OPTION; |