aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcmcia/axnet_cs.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-03-07 06:21:16 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2010-05-10 04:23:13 -0400
commiteb14120f743d29744d9475bffec56ff4ad43a749 (patch)
tree56857094d2b0cfc0ecbd1685f18d6edbe78e140f /drivers/net/pcmcia/axnet_cs.c
parenta7debe789dfcaee9c4d81e5738b0be8c5d93930b (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/net/pcmcia/axnet_cs.c')
-rw-r--r--drivers/net/pcmcia/axnet_cs.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
index 9f3d593f14ed..967547a84b4b 100644
--- a/drivers/net/pcmcia/axnet_cs.c
+++ b/drivers/net/pcmcia/axnet_cs.c
@@ -168,7 +168,6 @@ static int axnet_probe(struct pcmcia_device *link)
168 info = PRIV(dev); 168 info = PRIV(dev);
169 info->p_dev = link; 169 info->p_dev = link;
170 link->priv = dev; 170 link->priv = dev;
171 link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
172 link->conf.Attributes = CONF_ENABLE_IRQ; 171 link->conf.Attributes = CONF_ENABLE_IRQ;
173 link->conf.IntType = INT_MEMORY_AND_IO; 172 link->conf.IntType = INT_MEMORY_AND_IO;
174 173
@@ -265,12 +264,9 @@ static int try_io_port(struct pcmcia_device *link)
265 int j, ret; 264 int j, ret;
266 if (link->io.NumPorts1 == 32) { 265 if (link->io.NumPorts1 == 32) {
267 link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; 266 link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
268 if (link->io.NumPorts2 > 0) { 267 /* for master/slave multifunction cards */
269 /* for master/slave multifunction cards */ 268 if (link->io.NumPorts2 > 0)
270 link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; 269 link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
271 link->irq.Attributes =
272 IRQ_TYPE_DYNAMIC_SHARING;
273 }
274 } else { 270 } else {
275 /* This should be two 16-port windows */ 271 /* This should be two 16-port windows */
276 link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; 272 link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
@@ -336,8 +332,7 @@ static int axnet_config(struct pcmcia_device *link)
336 if (ret != 0) 332 if (ret != 0)
337 goto failed; 333 goto failed;
338 334
339 ret = pcmcia_request_irq(link, &link->irq); 335 if (!link->irq)
340 if (ret)
341 goto failed; 336 goto failed;
342 337
343 if (link->io.NumPorts2 == 8) { 338 if (link->io.NumPorts2 == 8) {
@@ -349,7 +344,7 @@ static int axnet_config(struct pcmcia_device *link)
349 if (ret) 344 if (ret)
350 goto failed; 345 goto failed;
351 346
352 dev->irq = link->irq.AssignedIRQ; 347 dev->irq = link->irq;
353 dev->base_addr = link->io.BasePort1; 348 dev->base_addr = link->io.BasePort1;
354 349
355 if (!get_prom(link)) { 350 if (!get_prom(link)) {