diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2021-07-21 17:02:16 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-29 17:08:40 +0200 |
commit | fa11c81ce2a19b30af2fc16d3958efece4fd56d0 (patch) | |
tree | 5f8b59581519f075aa1dfa74b4a4ce710db9400c /drivers/parport | |
parent | parport: serial: Get rid of IRQ_NONE abuse (diff) | |
download | linux-fa11c81ce2a19b30af2fc16d3958efece4fd56d0.tar.xz linux-fa11c81ce2a19b30af2fc16d3958efece4fd56d0.zip |
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>
Diffstat (limited to 'drivers/parport')
-rw-r--r-- | drivers/parport/parport_serial.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/parport/parport_serial.c b/drivers/parport/parport_serial.c index 14e2427676f0..9f5d784cd95d 100644 --- a/drivers/parport/parport_serial.c +++ b/drivers/parport/parport_serial.c @@ -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) { |