From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>,
Philipp Zabel <p.zabel@pengutronix.de>
Cc: linux-i2c@vger.kernel.org
Subject: [PATCH] i2c: rcar: call pm_runtime_put() only if it has ID_P_PM_BLOCKED
Date: Thu, 14 Apr 2022 01:15:51 +0000 [thread overview]
Message-ID: <874k2wtqgp.wl-kuninori.morimoto.gx@renesas.com> (raw)
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
ID_P_PM_BLOCKED is controlling PM status.
We need to check it for pm_runtime_put() on rcar_i2c_probe(),
otherwise it will be duplicated put.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
Wolfram:
It is not deeply tested.
drivers/i2c/busses/i2c-rcar.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
index f71c730f9838..b5f0929bcea5 100644
--- a/drivers/i2c/busses/i2c-rcar.c
+++ b/drivers/i2c/busses/i2c-rcar.c
@@ -1121,7 +1121,8 @@ static int rcar_i2c_probe(struct platform_device *pdev)
out_del_device:
i2c_del_adapter(&priv->adap);
out_pm_put:
- pm_runtime_put(dev);
+ if (priv->flags & ID_P_PM_BLOCKED)
+ pm_runtime_put(dev);
out_pm_disable:
pm_runtime_disable(dev);
return ret;
--
2.25.1
next reply other threads:[~2022-04-14 1:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-14 1:15 Kuninori Morimoto [this message]
2022-05-20 9:44 ` [PATCH] i2c: rcar: call pm_runtime_put() only if it has ID_P_PM_BLOCKED Wolfram Sang
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=874k2wtqgp.wl-kuninori.morimoto.gx@renesas.com \
--to=kuninori.morimoto.gx@renesas.com \
--cc=linux-i2c@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=wsa+renesas@sang-engineering.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.