aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parport/parport_pc.c
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2013-12-04 15:08:55 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-11 02:04:38 -0500
commit3f6e48597b2ad8e81852407319fabd6ed4665add (patch)
tree471e28b150e4153fe997e813b6950e2fa434a93e /drivers/parport/parport_pc.c
parent4455d9fd48093d27c95a802071c9dca9f79d8fff (diff)
parport: parport_pc: fix id print of a device
Since commit 7106b4e3 ("8250: Oxford Semiconductor Devices") the debug print of the device id does no longer match the real device if it is located in the "enum" behind oxsemi_pcie_pport. The reason is that the code assumes that each id contains one entry in the PCI table. The fix is to lookup the currently used id from the id-> parameter. Cc: Lee Howard <lee.howard@mainpine.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/parport/parport_pc.c')
-rw-r--r--drivers/parport/parport_pc.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c
index 963761526229..4b03dc5d571b 100644
--- a/drivers/parport/parport_pc.c
+++ b/drivers/parport/parport_pc.c
@@ -2827,16 +2827,12 @@ static int parport_pc_pci_probe(struct pci_dev *dev,
2827 if (irq == IRQ_NONE) { 2827 if (irq == IRQ_NONE) {
2828 printk(KERN_DEBUG 2828 printk(KERN_DEBUG
2829 "PCI parallel port detected: %04x:%04x, I/O at %#lx(%#lx)\n", 2829 "PCI parallel port detected: %04x:%04x, I/O at %#lx(%#lx)\n",
2830 parport_pc_pci_tbl[i + last_sio].vendor, 2830 id->vendor, id->device, io_lo, io_hi);
2831 parport_pc_pci_tbl[i + last_sio].device,
2832 io_lo, io_hi);
2833 irq = PARPORT_IRQ_NONE; 2831 irq = PARPORT_IRQ_NONE;
2834 } else { 2832 } else {
2835 printk(KERN_DEBUG 2833 printk(KERN_DEBUG
2836 "PCI parallel port detected: %04x:%04x, I/O at %#lx(%#lx), IRQ %d\n", 2834 "PCI parallel port detected: %04x:%04x, I/O at %#lx(%#lx), IRQ %d\n",
2837 parport_pc_pci_tbl[i + last_sio].vendor, 2835 id->vendor, id->device, io_lo, io_hi, irq);
2838 parport_pc_pci_tbl[i + last_sio].device,
2839 io_lo, io_hi, irq);
2840 } 2836 }
2841 data->ports[count] = 2837 data->ports[count] =
2842 parport_pc_probe_port(io_lo, io_hi, irq, 2838 parport_pc_probe_port(io_lo, io_hi, irq,