linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <patrice.chotard@st.com>
To: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
	<linux-pm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Kevin Hilman <khilman@kernel.org>
Cc: <patrice.chotard@st.com>, Erwan Le Ray <erwan.leray@st.com>,
	Alexandre TORGUE <alexandre.torgue@st.com>,
	Fabrice Gasnier <fabrice.gasnier@st.com>,
	Pierre-Yves MORDRET <pierre-yves.mordret@st.com>,
	<amelie.delaunay@st.com>, <erwan_leray@st.com>,
	<alain.volmat@st.com>
Subject: [PATCH v1 4/4] i2c: stm32f7: Make usage of dev_wakeup_path() helper
Date: Fri, 6 Nov 2020 08:33:58 +0100	[thread overview]
Message-ID: <20201106073358.8379-5-patrice.chotard@st.com> (raw)
In-Reply-To: <20201106073358.8379-1-patrice.chotard@st.com>

From: Patrice Chotard <patrice.chotard@st.com>

Make usage of dev_wakeup_path() helper.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
---
 drivers/i2c/busses/i2c-stm32f7.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c
index f41f51a176a1..9aa8e65b511e 100644
--- a/drivers/i2c/busses/i2c-stm32f7.c
+++ b/drivers/i2c/busses/i2c-stm32f7.c
@@ -2322,7 +2322,7 @@ static int stm32f7_i2c_suspend(struct device *dev)
 
 	i2c_mark_adapter_suspended(&i2c_dev->adap);
 
-	if (!device_may_wakeup(dev) && !dev->power.wakeup_path) {
+	if (!device_may_wakeup(dev) && !device_wakeup_path(dev)) {
 		ret = stm32f7_i2c_regs_backup(i2c_dev);
 		if (ret < 0) {
 			i2c_mark_adapter_resumed(&i2c_dev->adap);
@@ -2341,7 +2341,7 @@ static int stm32f7_i2c_resume(struct device *dev)
 	struct stm32f7_i2c_dev *i2c_dev = dev_get_drvdata(dev);
 	int ret;
 
-	if (!device_may_wakeup(dev) && !dev->power.wakeup_path) {
+	if (!device_may_wakeup(dev) && !device_wakeup_path(dev)) {
 		ret = pm_runtime_force_resume(dev);
 		if (ret < 0)
 			return ret;
-- 
2.17.1


  parent reply	other threads:[~2020-11-06  7:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-06  7:33 [PATCH v1 0/4] PM: Add dev_wakeup_path() helper patrice.chotard
2020-11-06  7:33 ` [PATCH v1 1/4] PM / wakeup: " patrice.chotard
2020-11-06  7:33 ` [PATCH v1 2/4] PM: domains: Make usage of device_wakeup_path() helper patrice.chotard
2020-11-06  7:33 ` [PATCH v1 3/4] PM: core: " patrice.chotard
2020-11-06  7:33 ` patrice.chotard [this message]
2020-11-06  9:46 ` [PATCH v1 0/4] PM: Add dev_wakeup_path() helper Ulf Hansson
2020-11-18 13:08 ` Rafael J. Wysocki
2020-11-19  7:27   ` Patrice CHOTARD

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=20201106073358.8379-5-patrice.chotard@st.com \
    --to=patrice.chotard@st.com \
    --cc=alain.volmat@st.com \
    --cc=alexandre.torgue@st.com \
    --cc=amelie.delaunay@st.com \
    --cc=erwan.leray@st.com \
    --cc=erwan_leray@st.com \
    --cc=fabrice.gasnier@st.com \
    --cc=khilman@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pierre-yves.mordret@st.com \
    --cc=rjw@rjwysocki.net \
    --cc=ulf.hansson@linaro.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).