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/char/pcmcia/ipwireless | |
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/char/pcmcia/ipwireless')
-rw-r--r-- | drivers/char/pcmcia/ipwireless/main.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/char/pcmcia/ipwireless/main.c b/drivers/char/pcmcia/ipwireless/main.c index dff24dae1485..2237890bc256 100644 --- a/drivers/char/pcmcia/ipwireless/main.c +++ b/drivers/char/pcmcia/ipwireless/main.c | |||
@@ -195,9 +195,6 @@ static int config_ipwireless(struct ipw_dev *ipw) | |||
195 | link->conf.Attributes = CONF_ENABLE_IRQ; | 195 | link->conf.Attributes = CONF_ENABLE_IRQ; |
196 | link->conf.IntType = INT_MEMORY_AND_IO; | 196 | link->conf.IntType = INT_MEMORY_AND_IO; |
197 | 197 | ||
198 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
199 | link->irq.Handler = ipwireless_interrupt; | ||
200 | |||
201 | INIT_WORK(&ipw->work_reboot, signalled_reboot_work); | 198 | INIT_WORK(&ipw->work_reboot, signalled_reboot_work); |
202 | 199 | ||
203 | ipwireless_init_hardware_v1(ipw->hardware, link->io.BasePort1, | 200 | ipwireless_init_hardware_v1(ipw->hardware, link->io.BasePort1, |
@@ -205,8 +202,7 @@ static int config_ipwireless(struct ipw_dev *ipw) | |||
205 | ipw->is_v2_card, signalled_reboot_callback, | 202 | ipw->is_v2_card, signalled_reboot_callback, |
206 | ipw); | 203 | ipw); |
207 | 204 | ||
208 | ret = pcmcia_request_irq(link, &link->irq); | 205 | ret = pcmcia_request_irq(link, ipwireless_interrupt); |
209 | |||
210 | if (ret != 0) | 206 | if (ret != 0) |
211 | goto exit; | 207 | goto exit; |
212 | 208 | ||
@@ -217,7 +213,7 @@ static int config_ipwireless(struct ipw_dev *ipw) | |||
217 | (unsigned int) link->io.BasePort1, | 213 | (unsigned int) link->io.BasePort1, |
218 | (unsigned int) (link->io.BasePort1 + | 214 | (unsigned int) (link->io.BasePort1 + |
219 | link->io.NumPorts1 - 1), | 215 | link->io.NumPorts1 - 1), |
220 | (unsigned int) link->irq.AssignedIRQ); | 216 | (unsigned int) link->irq); |
221 | if (ipw->attr_memory && ipw->common_memory) | 217 | if (ipw->attr_memory && ipw->common_memory) |
222 | printk(KERN_INFO IPWIRELESS_PCCARD_NAME | 218 | printk(KERN_INFO IPWIRELESS_PCCARD_NAME |
223 | ": attr memory 0x%08lx-0x%08lx, common memory 0x%08lx-0x%08lx\n", | 219 | ": attr memory 0x%08lx-0x%08lx, common memory 0x%08lx-0x%08lx\n", |
@@ -271,8 +267,6 @@ exit: | |||
271 | 267 | ||
272 | static void release_ipwireless(struct ipw_dev *ipw) | 268 | static void release_ipwireless(struct ipw_dev *ipw) |
273 | { | 269 | { |
274 | pcmcia_disable_device(ipw->link); | ||
275 | |||
276 | if (ipw->common_memory) { | 270 | if (ipw->common_memory) { |
277 | release_mem_region(ipw->request_common_memory.Base, | 271 | release_mem_region(ipw->request_common_memory.Base, |
278 | ipw->request_common_memory.Size); | 272 | ipw->request_common_memory.Size); |
@@ -288,7 +282,6 @@ static void release_ipwireless(struct ipw_dev *ipw) | |||
288 | if (ipw->attr_memory) | 282 | if (ipw->attr_memory) |
289 | pcmcia_release_window(ipw->link, ipw->handle_attr_memory); | 283 | pcmcia_release_window(ipw->link, ipw->handle_attr_memory); |
290 | 284 | ||
291 | /* Break the link with Card Services */ | ||
292 | pcmcia_disable_device(ipw->link); | 285 | pcmcia_disable_device(ipw->link); |
293 | } | 286 | } |
294 | 287 | ||