Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c88fe01f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "clk: Fix handoff counts for parent of handoff enabled clocks"

parents 61376520 9e3ba4ae
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -188,6 +188,9 @@ static bool clk_core_is_enabled(struct clk_core *core)
	return core->ops->is_enabled(core->hw);
}

static void clk_core_unprepare(struct clk_core *core);
static void clk_core_disable(struct clk_core *core);

static void clk_unprepare_unused_subtree(struct clk_core *core)
{
	struct clk_core *child;
@@ -207,7 +210,7 @@ static void clk_unprepare_unused_subtree(struct clk_core *core)
	 */
	if (core->need_handoff_prepare) {
		core->need_handoff_prepare = false;
		core->prepare_count--;
		clk_core_unprepare(core);
	}

	if (core->prepare_count)
@@ -246,7 +249,9 @@ static void clk_disable_unused_subtree(struct clk_core *core)
	 */
	if (core->need_handoff_enable) {
		core->need_handoff_enable = false;
		core->enable_count--;
		flags = clk_enable_lock();
		clk_core_disable(core);
		clk_enable_unlock(flags);
	}

	flags = clk_enable_lock();