From: Stanimir Varbanov <stanimir.varbanov@linaro.org>
To: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
Stanimir Varbanov <stanimir.varbanov@linaro.org>
Subject: [PATCH] PM: runtime: Use pmruntime sync variant to put suppliers
Date: Wed, 7 Oct 2020 03:19:34 +0300 [thread overview]
Message-ID: <20201007001934.18606-1-stanimir.varbanov@linaro.org> (raw)
Calling pm_runtime_put_sync over a device with suppliers with device
link flags PM_RUNTIME | RPM_ACTIVE it is observed that the supplier
is not put (turned off) at the end, but instead put asynchronously.
In some case This could lead to issues for the callers which expects
that the pmruntime sync variants should also put the suppliers
synchronously.
Also the opposite rpm_get_suppliers is already using pmruntime _sync
variant of the API.
Correct this by changing pmruntime_put to pmruntime_put_sync in
rpm_put_suppliers.
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
---
drivers/base/power/runtime.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c
index 6f605f7820bb..8dab4fcab4e8 100644
--- a/drivers/base/power/runtime.c
+++ b/drivers/base/power/runtime.c
@@ -313,7 +313,7 @@ static void rpm_put_suppliers(struct device *dev)
device_links_read_lock_held()) {
while (refcount_dec_not_one(&link->rpm_active))
- pm_runtime_put(link->supplier);
+ pm_runtime_put_sync(link->supplier);
}
}
--
2.17.1
next reply other threads:[~2020-10-07 0:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-07 0:19 Stanimir Varbanov [this message]
2020-10-07 14:37 ` [PATCH] PM: runtime: Use pmruntime sync variant to put suppliers Rafael J. Wysocki
2020-10-08 1:08 ` Stanimir Varbanov
2020-11-05 17:42 ` 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=20201007001934.18606-1-stanimir.varbanov@linaro.org \
--to=stanimir.varbanov@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/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).