Commit 3196a605 authored by Minghao Chi's avatar Minghao Chi Committed by Stephen Boyd
Browse files

clk: using pm_runtime_resume_and_get instead of pm_runtime_get_sync



Using pm_runtime_resume_and_get is more appropriate
for simplifing code

Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarMinghao Chi <chi.minghao@zte.com.cn>
Link: https://lore.kernel.org/r/20220418110455.2559264-1-chi.minghao@zte.com.cn


[sboyd@kernel.org: Drop local ret variable too]
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent bab79506
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -108,17 +108,10 @@ struct clk {
/***           runtime pm          ***/
static int clk_pm_runtime_get(struct clk_core *core)
{
	int ret;

	if (!core->rpm_enabled)
		return 0;

	ret = pm_runtime_get_sync(core->dev);
	if (ret < 0) {
		pm_runtime_put_noidle(core->dev);
		return ret;
	}
	return 0;
	return pm_runtime_resume_and_get(core->dev);
}

static void clk_pm_runtime_put(struct clk_core *core)