[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250210075812.3900646-6-hayashi.kunihiko@socionext.com>
Date: Mon, 10 Feb 2025 16:58:12 +0900
From: Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>
To: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
Krzysztof Wilczynski <kw@...ux.com>,
Kishon Vijay Abraham I <kishon@...nel.org>,
Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Lorenzo Pieralisi <lpieralisi@...nel.org>,
Gustavo Pimentel <gustavo.pimentel@...opsys.com>,
Bjorn Helgaas <bhelgaas@...gle.com>
Cc: linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org,
Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>
Subject: [PATCH v3 5/5] misc: pci_endpoint_test: Do not use managed irq functions
The pci_endpoint_test_request_irq() and pci_endpoint_test_release_irq()
are called repeatedly by the users through pci_endpoint_test_set_irq().
So using the managed version of IRQ functions within these functions
has no effect.
Suggested-by: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>
---
drivers/misc/pci_endpoint_test.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c
index 8d98cd18634d..9465d2ab259a 100644
--- a/drivers/misc/pci_endpoint_test.c
+++ b/drivers/misc/pci_endpoint_test.c
@@ -212,10 +212,9 @@ static void pci_endpoint_test_release_irq(struct pci_endpoint_test *test)
{
int i;
struct pci_dev *pdev = test->pdev;
- struct device *dev = &pdev->dev;
for (i = 0; i < test->num_irqs; i++)
- devm_free_irq(dev, pci_irq_vector(pdev, i), test);
+ free_irq(pci_irq_vector(pdev, i), test);
test->num_irqs = 0;
}
@@ -228,9 +227,9 @@ static int pci_endpoint_test_request_irq(struct pci_endpoint_test *test)
struct device *dev = &pdev->dev;
for (i = 0; i < test->num_irqs; i++) {
- ret = devm_request_irq(dev, pci_irq_vector(pdev, i),
- pci_endpoint_test_irqhandler,
- IRQF_SHARED, test->name, test);
+ ret = request_irq(pci_irq_vector(pdev, i),
+ pci_endpoint_test_irqhandler, IRQF_SHARED,
+ test->name, test);
if (ret)
goto fail;
}
--
2.25.1
Powered by blists - more mailing lists