Commit fa11c81c authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman

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: default avatarSudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210721150216.64823-2-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 09b18f2f
......@@ -606,7 +606,9 @@ static int parport_register(struct pci_dev *dev, const struct pci_device_id *id)
"hi" as an offset (see SYBA
def.) */
/* TODO: test if sharing interrupts works */
irq = dev->irq;
irq = pci_irq_vector(dev, 0);
if (irq < 0)
return irq;
if (irq == 0)
irq = PARPORT_IRQ_NONE;
if (irq == PARPORT_IRQ_NONE) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment