Commit 009d4368 authored by Dmitry Baryshkov's avatar Dmitry Baryshkov Committed by Bjorn Andersson

clk: qcom: dispcc-sm8250: switch to devm_pm_runtime_enable

Switch to using the devm_pm_runtime_enable() instead of hand-coding
corresponding action to call pm_runtime_disable().
Signed-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: default avatarBjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230103145515.1164020-19-dmitry.baryshkov@linaro.org
parent 7e5c218f
...@@ -1251,19 +1251,12 @@ static const struct of_device_id disp_cc_sm8250_match_table[] = { ...@@ -1251,19 +1251,12 @@ static const struct of_device_id disp_cc_sm8250_match_table[] = {
}; };
MODULE_DEVICE_TABLE(of, disp_cc_sm8250_match_table); MODULE_DEVICE_TABLE(of, disp_cc_sm8250_match_table);
static void disp_cc_sm8250_pm_runtime_disable(void *data)
{
pm_runtime_disable(data);
}
static int disp_cc_sm8250_probe(struct platform_device *pdev) static int disp_cc_sm8250_probe(struct platform_device *pdev)
{ {
struct regmap *regmap; struct regmap *regmap;
int ret; int ret;
pm_runtime_enable(&pdev->dev); ret = devm_pm_runtime_enable(&pdev->dev);
ret = devm_add_action_or_reset(&pdev->dev, disp_cc_sm8250_pm_runtime_disable, &pdev->dev);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment