From: lizhe <sensor1010@163.com>
To: bhelgaas@google.com, lukas@wunner.de, ameynarkhede03@gmail.com,
hdegoede@redhat.com, sensor1010@163.com,
naveennaidu479@gmail.com
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] PCI:pciehp: Replace request_threaded_irq with devm_request_threaded_irq
Date: Sun, 6 Feb 2022 06:07:05 -0800 [thread overview]
Message-ID: <20220206140705.10705-1-sensor1010@163.com> (raw)
Memory allocated with this function is automatically
freed on driver detach
Signed-off-by: lizhe <sensor1010@163.com>
---
drivers/pci/hotplug/pciehp_hpc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
index 1c1ebf3dad43..aca59c6fdcbc 100644
--- a/drivers/pci/hotplug/pciehp_hpc.c
+++ b/drivers/pci/hotplug/pciehp_hpc.c
@@ -66,7 +66,7 @@ static inline int pciehp_request_irq(struct controller *ctrl)
}
/* Installs the interrupt handler */
- retval = request_threaded_irq(irq, pciehp_isr, pciehp_ist,
+ retval = devm_request_threaded_irq(irq, pciehp_isr, pciehp_ist,
IRQF_SHARED, "pciehp", ctrl);
if (retval)
ctrl_err(ctrl, "Cannot get irq %d for the hotplug controller\n",
@@ -78,8 +78,6 @@ static inline void pciehp_free_irq(struct controller *ctrl)
{
if (pciehp_poll_mode)
kthread_stop(ctrl->poll_thread);
- else
- free_irq(ctrl->pcie->irq, ctrl);
}
static int pcie_poll_cmd(struct controller *ctrl, int timeout)
--
2.25.1
next reply other threads:[~2022-02-06 14:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-06 14:07 lizhe [this message]
2022-02-06 14:34 ` [PATCH] PCI:pciehp: Replace request_threaded_irq with devm_request_threaded_irq Hans de Goede
2022-02-06 16:14 ` kernel test robot
2022-02-06 18:37 ` kernel test robot
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=20220206140705.10705-1-sensor1010@163.com \
--to=sensor1010@163.com \
--cc=ameynarkhede03@gmail.com \
--cc=bhelgaas@google.com \
--cc=hdegoede@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=naveennaidu479@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.