diff options
Diffstat (limited to 'drivers/parport/parport_serial.c')
-rw-r--r-- | drivers/parport/parport_serial.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/parport/parport_serial.c b/drivers/parport/parport_serial.c index f3492110b1a..c3bb84ac931 100644 --- a/drivers/parport/parport_serial.c +++ b/drivers/parport/parport_serial.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
24 | #include <linux/interrupt.h> | ||
24 | #include <linux/parport.h> | 25 | #include <linux/parport.h> |
25 | #include <linux/parport_pc.h> | 26 | #include <linux/parport_pc.h> |
26 | #include <linux/8250_pci.h> | 27 | #include <linux/8250_pci.h> |
@@ -311,6 +312,7 @@ static int __devinit parport_register (struct pci_dev *dev, | |||
311 | int lo = card->addr[n].lo; | 312 | int lo = card->addr[n].lo; |
312 | int hi = card->addr[n].hi; | 313 | int hi = card->addr[n].hi; |
313 | unsigned long io_lo, io_hi; | 314 | unsigned long io_lo, io_hi; |
315 | int irq; | ||
314 | 316 | ||
315 | if (priv->num_par == ARRAY_SIZE (priv->port)) { | 317 | if (priv->num_par == ARRAY_SIZE (priv->port)) { |
316 | printk (KERN_WARNING | 318 | printk (KERN_WARNING |
@@ -329,10 +331,20 @@ static int __devinit parport_register (struct pci_dev *dev, | |||
329 | "hi" as an offset (see SYBA | 331 | "hi" as an offset (see SYBA |
330 | def.) */ | 332 | def.) */ |
331 | /* TODO: test if sharing interrupts works */ | 333 | /* TODO: test if sharing interrupts works */ |
332 | dev_dbg(&dev->dev, "PCI parallel port detected: I/O at " | 334 | irq = dev->irq; |
333 | "%#lx(%#lx)\n", io_lo, io_hi); | 335 | if (irq == IRQ_NONE) { |
334 | port = parport_pc_probe_port (io_lo, io_hi, PARPORT_IRQ_NONE, | 336 | dev_dbg(&dev->dev, |
335 | PARPORT_DMA_NONE, &dev->dev); | 337 | "PCI parallel port detected: I/O at %#lx(%#lx)\n", |
338 | io_lo, io_hi); | ||
339 | irq = PARPORT_IRQ_NONE; | ||
340 | } else { | ||
341 | dev_dbg(&dev->dev, | ||
342 | "PCI parallel port detected: I/O at %#lx(%#lx), IRQ %d\n", | ||
343 | io_lo, io_hi, irq); | ||
344 | irq = PARPORT_IRQ_NONE; | ||
345 | } | ||
346 | port = parport_pc_probe_port (io_lo, io_hi, irq, | ||
347 | PARPORT_DMA_NONE, &dev->dev, IRQF_SHARED); | ||
336 | if (port) { | 348 | if (port) { |
337 | priv->port[priv->num_par++] = port; | 349 | priv->port[priv->num_par++] = port; |
338 | success = 1; | 350 | success = 1; |