* [PATCH v1 1/2] parport: serial: Get rid of IRQ_NONE abuse
@ 2021-07-21 15:02 Andy Shevchenko
2021-07-21 15:02 ` [PATCH v1 2/2] parport: serial: Retrieve IRQ vector with help of special getter Andy Shevchenko
0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2021-07-21 15:02 UTC (permalink / raw)
To: Andy Shevchenko, linux-kernel; +Cc: Sudip Mukherjee, gregkh
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>
---
drivers/parport/parport_serial.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/parport/parport_serial.c b/drivers/parport/parport_serial.c
index 96b888bb49c6..14e2427676f0 100644
--- a/drivers/parport/parport_serial.c
+++ b/drivers/parport/parport_serial.c
@@ -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",
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v1 2/2] parport: serial: Retrieve IRQ vector with help of special getter
2021-07-21 15:02 [PATCH v1 1/2] parport: serial: Get rid of IRQ_NONE abuse Andy Shevchenko
@ 2021-07-21 15:02 ` Andy Shevchenko
2021-07-29 8:39 ` Sudip Mukherjee
0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2021-07-21 15:02 UTC (permalink / raw)
To: Andy Shevchenko, linux-kernel; +Cc: Sudip Mukherjee, gregkh
pci_irq_vector() may be used to retrieve IRQ vector for a PCI device.
Use it instead of direct access.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/parport/parport_serial.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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) {
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1 2/2] parport: serial: Retrieve IRQ vector with help of special getter
2021-07-21 15:02 ` [PATCH v1 2/2] parport: serial: Retrieve IRQ vector with help of special getter Andy Shevchenko
@ 2021-07-29 8:39 ` Sudip Mukherjee
0 siblings, 0 replies; 3+ messages in thread
From: Sudip Mukherjee @ 2021-07-29 8:39 UTC (permalink / raw)
To: Andy Shevchenko, gregkh; +Cc: linux-kernel
Thanks Andy.
On Wed, Jul 21, 2021 at 06:02:16PM +0300, Andy Shevchenko wrote:
> pci_irq_vector() may be used to retrieve IRQ vector for a PCI device.
> Use it instead of direct access.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
For both the patches,
Acked-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Greg, can you please take them.
--
Regards
Sudip
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-29 8:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21 15:02 [PATCH v1 1/2] parport: serial: Get rid of IRQ_NONE abuse Andy Shevchenko
2021-07-21 15:02 ` [PATCH v1 2/2] parport: serial: Retrieve IRQ vector with help of special getter Andy Shevchenko
2021-07-29 8:39 ` Sudip Mukherjee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).