mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] can: m_can: pci: add missing pm_runtime_dont_use_autosuspend() call
@ 2026-09-16 12:42 Joshua Crofts
  2026-09-18  9:24 ` Markus Schneider-Pargmann
  0 siblings, 1 reply; 3+ messages in thread
From: Joshua Crofts @ 2026-09-16 12:42 UTC (permalink / raw)
  To: Markus Schneider-Pargmann, Marc Kleine-Budde, Vincent Mailhol
  Cc: linux-can, linux-kernel

m_can_pci_remove() forgets to call pm_runtime_dont_use_autosuspend() on
teardown, even though autosuspend is enabled in m_can_pci_probe().

Add the missing function call.

Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
---
Found using a Coccinelle script I'm currently working on [1].

[1] https://lore.kernel.org/cocci/20260916095616.1394-1-joshua.crofts1@gmail.com
---
 drivers/net/can/m_can/m_can_pci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/can/m_can/m_can_pci.c b/drivers/net/can/m_can/m_can_pci.c
index d11a7c88fc32..3c595749b5c7 100644
--- a/drivers/net/can/m_can/m_can_pci.c
+++ b/drivers/net/can/m_can/m_can_pci.c
@@ -159,6 +159,7 @@ static void m_can_pci_remove(struct pci_dev *pci)
 	struct m_can_pci_priv *priv = cdev_to_priv(mcan_class);
 
 	pm_runtime_forbid(&pci->dev);
+	pm_runtime_dont_use_autosuspend(&pci->dev);
 	pm_runtime_get_noresume(&pci->dev);
 
 	/* Disable interrupt control at CAN wrapper IP */
-- 
2.47.3


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-18 11:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-16 12:42 [PATCH] can: m_can: pci: add missing pm_runtime_dont_use_autosuspend() call Joshua Crofts
2026-09-18  9:24 ` Markus Schneider-Pargmann
2026-09-18 11:15   ` Joshua Crofts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®