Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f6e4859 authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Greg Kroah-Hartman
Browse files

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: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4455d9fd
Loading
Loading
Loading
Loading
+2 −6
Original line number Original line Diff line number Diff line
@@ -2827,16 +2827,12 @@ static int parport_pc_pci_probe(struct pci_dev *dev,
		if (irq == IRQ_NONE) {
		if (irq == IRQ_NONE) {
			printk(KERN_DEBUG
			printk(KERN_DEBUG
	"PCI parallel port detected: %04x:%04x, I/O at %#lx(%#lx)\n",
	"PCI parallel port detected: %04x:%04x, I/O at %#lx(%#lx)\n",
				parport_pc_pci_tbl[i + last_sio].vendor,
				id->vendor, id->device, io_lo, io_hi);
				parport_pc_pci_tbl[i + last_sio].device,
				io_lo, io_hi);
			irq = PARPORT_IRQ_NONE;
			irq = PARPORT_IRQ_NONE;
		} else {
		} else {
			printk(KERN_DEBUG
			printk(KERN_DEBUG
	"PCI parallel port detected: %04x:%04x, I/O at %#lx(%#lx), IRQ %d\n",
	"PCI parallel port detected: %04x:%04x, I/O at %#lx(%#lx), IRQ %d\n",
				parport_pc_pci_tbl[i + last_sio].vendor,
				id->vendor, id->device, io_lo, io_hi, irq);
				parport_pc_pci_tbl[i + last_sio].device,
				io_lo, io_hi, irq);
		}
		}
		data->ports[count] =
		data->ports[count] =
			parport_pc_probe_port(io_lo, io_hi, irq,
			parport_pc_probe_port(io_lo, io_hi, irq,