Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

parport: serial: Retrieve IRQ vector with help of special getter

pci_irq_vector() may be used to retrieve IRQ vector for a PCI device.
Use it instead of direct access.

Acked-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210721150216.64823-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Andy Shevchenko and committed by
Greg Kroah-Hartman
fa11c81c 09b18f2f

+3 -1
+3 -1
drivers/parport/parport_serial.c
··· 606 606 "hi" as an offset (see SYBA 607 607 def.) */ 608 608 /* TODO: test if sharing interrupts works */ 609 - irq = dev->irq; 609 + irq = pci_irq_vector(dev, 0); 610 + if (irq < 0) 611 + return irq; 610 612 if (irq == 0) 611 613 irq = PARPORT_IRQ_NONE; 612 614 if (irq == PARPORT_IRQ_NONE) {