Message ID | 20220907110728.19092-10-johan+linaro@kernel.org |
---|---|
State | Accepted |
Commit | e57655e66806750785f9121c98a962404d02395b |
Headers | show |
Series | phy: qcom-qmp: further clean ups | expand |
On 07/09/2022 14:07, Johan Hovold wrote: > 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> > --- > drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Nit from the patch 01 applies too.
On Fri, Sep 09, 2022 at 12:45:43PM +0300, Dmitry Baryshkov wrote: > On 07/09/2022 14:07, Johan Hovold wrote: > > 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> > > --- > > drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 7 +++---- > > 1 file changed, 3 insertions(+), 4 deletions(-) > > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > > Nit from the patch 01 applies too. Still very much disagree with you on that. Johan
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c index fba8e40441cb..b63183aaacb8 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c @@ -2838,7 +2838,9 @@ static int qcom_qmp_phy_usb_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. @@ -2872,13 +2874,10 @@ static int qcom_qmp_phy_usb_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; }
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> --- drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)