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 /drivers/isdn/hisax/avma1_cs.c | |
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>
Diffstat (limited to 'drivers/isdn/hisax/avma1_cs.c')
-rw-r--r-- | drivers/isdn/hisax/avma1_cs.c | 12 |
1 files changed, 4 insertions, 8 deletions
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; |