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/hardware/avm/avm_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/hardware/avm/avm_cs.c')
-rw-r--r-- | drivers/isdn/hardware/avm/avm_cs.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/isdn/hardware/avm/avm_cs.c b/drivers/isdn/hardware/avm/avm_cs.c index 94b796d8405..0d485f6c219 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 | ||