From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-kernel@vger.kernel.org
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>, gregkh@linuxfoundation.org
Subject: [PATCH v1 2/2] parport: serial: Retrieve IRQ vector with help of special getter
Date: Wed, 21 Jul 2021 18:02:16 +0300 [thread overview]
Message-ID: <20210721150216.64823-2-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20210721150216.64823-1-andriy.shevchenko@linux.intel.com>
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
next prev parent reply other threads:[~2021-07-21 15:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2021-07-29 8:39 ` [PATCH v1 2/2] parport: serial: Retrieve IRQ vector with help of special getter Sudip Mukherjee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210721150216.64823-2-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sudipm.mukherjee@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.