Commit b69069c3 authored by Dmitry Baryshkov's avatar Dmitry Baryshkov Committed by Bjorn Andersson
Browse files

clk: qcom: dispcc-sm8450: 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-20-dmitry.baryshkov@linaro.org
parent 009d4368
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -1762,19 +1762,12 @@ static const struct of_device_id disp_cc_sm8450_match_table[] = {
};
MODULE_DEVICE_TABLE(of, disp_cc_sm8450_match_table);

static void disp_cc_sm8450_pm_runtime_disable(void *data)
{
	pm_runtime_disable(data);
}

static int disp_cc_sm8450_probe(struct platform_device *pdev)
{
	struct regmap *regmap;
	int ret;

	pm_runtime_enable(&pdev->dev);

	ret = devm_add_action_or_reset(&pdev->dev, disp_cc_sm8450_pm_runtime_disable, &pdev->dev);
	ret = devm_pm_runtime_enable(&pdev->dev);
	if (ret)
		return ret;