parport: serial: Get rid of IRQ_NONE abuse
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 21 Jul 2021 15:02:15 +0000 (18:02 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Jul 2021 15:08:40 +0000 (17:08 +0200)
IRQ_NONE definition is solely for IRQ handlers and not for generic
probe code. Replace it with plain integer.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210721150216.64823-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/parport/parport_serial.c

index 96b888b..14e2427 100644 (file)
@@ -607,11 +607,12 @@ static int parport_register(struct pci_dev *dev, const struct pci_device_id *id)
                                         def.) */
                /* TODO: test if sharing interrupts works */
                irq = dev->irq;
-               if (irq == IRQ_NONE) {
+               if (irq == 0)
+                       irq = PARPORT_IRQ_NONE;
+               if (irq == PARPORT_IRQ_NONE) {
                        dev_dbg(&dev->dev,
                                "PCI parallel port detected: I/O at %#lx(%#lx)\n",
                                io_lo, io_hi);
-                       irq = PARPORT_IRQ_NONE;
                } else {
                        dev_dbg(&dev->dev,
                                "PCI parallel port detected: I/O at %#lx(%#lx), IRQ %d\n",