From: Stephen Boyd <swboyd@chromium.org>
To: stable@vger.kernel.org
Cc: Johan Hovold <johan+linaro@kernel.org>,
linux-kernel@vger.kernel.org, patches@lists.linux.dev,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Vinod Koul <vkoul@kernel.org>
Subject: [PATCH 5.15.y 1/4] phy: qcom-qmp-combo: disable runtime PM on unbind
Date: Thu, 12 Jan 2023 16:54:02 -0800 [thread overview]
Message-ID: <20230113005405.3992011-2-swboyd@chromium.org> (raw)
In-Reply-To: <20230113005405.3992011-1-swboyd@chromium.org>
From: Johan Hovold <johan+linaro@kernel.org>
commit 4382d518d1887e62234560ea08a0203d11d28cc1 upstream.
Make sure to disable runtime PM also on driver unbind.
Fixes: ac0d239936bd ("phy: qcom-qmp: Add support for runtime PM").
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20220907110728.19092-2-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
---
drivers/phy/qualcomm/phy-qcom-qmp.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c
index a9687e040960..7b7557c35af6 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp.c
@@ -5740,7 +5740,9 @@ static int qcom_qmp_phy_probe(struct platform_device *pdev)
return -ENOMEM;
pm_runtime_set_active(dev);
- pm_runtime_enable(dev);
+ ret = devm_pm_runtime_enable(dev);
+ if (ret)
+ return ret;
/*
* Prevent runtime pm from being ON by default. Users can enable
* it using power/control in sysfs.
@@ -5790,13 +5792,10 @@ static int qcom_qmp_phy_probe(struct platform_device *pdev)
phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
if (!IS_ERR(phy_provider))
dev_info(dev, "Registered Qcom-QMP phy\n");
- else
- pm_runtime_disable(dev);
return PTR_ERR_OR_ZERO(phy_provider);
err_node_put:
- pm_runtime_disable(dev);
of_node_put(child);
return ret;
}
--
https://chromeos.dev
next prev parent reply other threads:[~2023-01-13 0:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-13 0:54 [PATCH 5.15.y 0/4] phy: qcom-qmp-combo: Backport some stable fixes Stephen Boyd
2023-01-13 0:54 ` Stephen Boyd [this message]
2023-01-13 0:54 ` [PATCH 5.15.y 2/4] phy: qcom-qmp-combo: fix memleak on probe deferral Stephen Boyd
2023-01-13 7:57 ` Johan Hovold
2023-01-13 19:53 ` Stephen Boyd
2023-01-13 0:54 ` [PATCH 5.15.y 3/4] phy: qcom-qmp-combo: fix broken power on Stephen Boyd
2023-01-13 8:07 ` Johan Hovold
2023-01-13 20:03 ` Stephen Boyd
2023-01-13 0:54 ` [PATCH 5.15.y 4/4] phy: qcom-qmp-combo: fix runtime suspend Stephen Boyd
2023-01-13 8:09 ` Johan Hovold
2023-01-13 20:04 ` Stephen Boyd
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=20230113005405.3992011-2-swboyd@chromium.org \
--to=swboyd@chromium.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=johan+linaro@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@lists.linux.dev \
--cc=stable@vger.kernel.org \
--cc=vkoul@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