From: Marc Kleine-Budde <mkl@pengutronix.de>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, linux-can@vger.kernel.org,
kernel@pengutronix.de, Marc Kleine-Budde <mkl@pengutronix.de>,
Patrik Flykt <patrik.flykt@linux.intel.com>,
Markus Schneider-Pargmann <msp@baylibre.com>
Subject: [PATCH net 03/10] can: m_can: m_can_plat_remove(): add missing pm_runtime_disable()
Date: Tue, 14 Oct 2025 14:17:50 +0200 [thread overview]
Message-ID: <20251014122140.990472-4-mkl@pengutronix.de> (raw)
In-Reply-To: <20251014122140.990472-1-mkl@pengutronix.de>
Commit 227619c3ff7c ("can: m_can: move runtime PM enable/disable to
m_can_platform") moved the PM runtime enable from the m_can core
driver into the m_can_platform.
That patch forgot to move the pm_runtime_disable() to
m_can_plat_remove(), so that unloading the m_can_platform driver
causes an "Unbalanced pm_runtime_enable!" error message.
Add the missing pm_runtime_disable() to m_can_plat_remove() to fix the
problem.
Cc: Patrik Flykt <patrik.flykt@linux.intel.com>
Fixes: 227619c3ff7c ("can: m_can: move runtime PM enable/disable to m_can_platform")
Reviewed-by: Markus Schneider-Pargmann <msp@baylibre.com>
Link: https://patch.msgid.link/20250929-m_can-fix-state-handling-v4-1-682b49b49d9a@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
drivers/net/can/m_can/m_can_platform.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/can/m_can/m_can_platform.c b/drivers/net/can/m_can/m_can_platform.c
index b832566efda0..057eaa7b8b4b 100644
--- a/drivers/net/can/m_can/m_can_platform.c
+++ b/drivers/net/can/m_can/m_can_platform.c
@@ -180,7 +180,7 @@ static void m_can_plat_remove(struct platform_device *pdev)
struct m_can_classdev *mcan_class = &priv->cdev;
m_can_class_unregister(mcan_class);
-
+ pm_runtime_disable(mcan_class->dev);
m_can_class_free_dev(mcan_class->net);
}
--
2.51.0
next prev parent reply other threads:[~2025-10-14 14:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-14 12:17 [PATCH net 0/10] pull-request: can 2025-10-14 Marc Kleine-Budde
2025-10-14 12:17 ` [PATCH net 01/10] can: gs_usb: increase max interface to U8_MAX Marc Kleine-Budde
2025-10-16 1:20 ` patchwork-bot+netdevbpf
2025-10-14 12:17 ` [PATCH net 02/10] can: gs_usb: gs_make_candev(): populate net_device->dev_port Marc Kleine-Budde
2025-10-14 12:17 ` Marc Kleine-Budde [this message]
2025-10-14 12:17 ` [PATCH net 04/10] can: m_can: m_can_handle_state_errors(): fix CAN state transition to Error Active Marc Kleine-Budde
2025-10-14 12:17 ` [PATCH net 05/10] can: m_can: m_can_chip_config(): bring up interface in correct state Marc Kleine-Budde
2025-10-14 12:17 ` [PATCH net 06/10] can: m_can: fix CAN state in system PM Marc Kleine-Budde
2025-10-14 12:17 ` [PATCH net 07/10] can: m_can: replace Dong Aisheng's old email address Marc Kleine-Budde
2025-10-14 12:17 ` [PATCH net 08/10] can: remove false statement about 1:1 mapping between DLC and length Marc Kleine-Budde
2025-10-14 12:17 ` [PATCH net 09/10] can: add Transmitter Delay Compensation (TDC) documentation Marc Kleine-Budde
2025-10-14 12:17 ` [PATCH net 10/10] can: j1939: add missing calls in NETDEV_UNREGISTER notification handler Marc Kleine-Budde
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=20251014122140.990472-4-mkl@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=davem@davemloft.net \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=msp@baylibre.com \
--cc=netdev@vger.kernel.org \
--cc=patrik.flykt@linux.intel.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 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).