mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-03 00:54:09 +08:00
phy: qcom-qmp-usb: disable runtime PM on unbind
Make sure to disable runtime PM also on driver unbind.
Fixes: ac0d239936
("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-10-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
6d07bd6f46
commit
e57655e668
@ -2838,7 +2838,9 @@ static int qcom_qmp_phy_usb_probe(struct platform_device *pdev)
|
|||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
pm_runtime_set_active(dev);
|
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
|
* Prevent runtime pm from being ON by default. Users can enable
|
||||||
* it using power/control in sysfs.
|
* 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);
|
phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
|
||||||
if (!IS_ERR(phy_provider))
|
if (!IS_ERR(phy_provider))
|
||||||
dev_info(dev, "Registered Qcom-QMP phy\n");
|
dev_info(dev, "Registered Qcom-QMP phy\n");
|
||||||
else
|
|
||||||
pm_runtime_disable(dev);
|
|
||||||
|
|
||||||
return PTR_ERR_OR_ZERO(phy_provider);
|
return PTR_ERR_OR_ZERO(phy_provider);
|
||||||
|
|
||||||
err_node_put:
|
err_node_put:
|
||||||
pm_runtime_disable(dev);
|
|
||||||
of_node_put(child);
|
of_node_put(child);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user