linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yongzhi Liu <lyz_cs@pku.edu.cn>
To: gregkh@linuxfoundation.org, rafael@kernel.org
Cc: linux-kernel@vger.kernel.org, lyz_cs@pku.edu.cn
Subject: [PATCH] driver core: Add missing pm_runtime_put_noidle
Date: Mon, 17 Jan 2022 03:27:42 -0800	[thread overview]
Message-ID: <1642418862-5868-1-git-send-email-lyz_cs@pku.edu.cn> (raw)

pm_runtime_get_noresume() in device_shutdown increments the
runtime PM usage counter, thus a matching decrement is needed
to keep the counter balanced.

Signed-off-by: Yongzhi Liu <lyz_cs@pku.edu.cn>
---
 drivers/base/core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index 7bb957b..d41be8a 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -4533,6 +4533,8 @@ void device_shutdown(void)
 			dev->driver->shutdown(dev);
 		}
 
+		pm_runtime_put_noidle(dev);
+
 		device_unlock(dev);
 		if (parent)
 			device_unlock(parent);
-- 
2.7.4


             reply	other threads:[~2022-01-17 11:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-17 11:27 Yongzhi Liu [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-01-17 11:07 [PATCH] driver core: Add missing pm_runtime_put_noidle Yongzhi Liu
2022-01-17 14:01 ` Rafael J. Wysocki

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=1642418862-5868-1-git-send-email-lyz_cs@pku.edu.cn \
    --to=lyz_cs@pku.edu.cn \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    /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).