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

Commit c288b855 authored by Linus Walleij's avatar Linus Walleij Committed by Chris Ball
Browse files

mmc: check for > 1 clk_requests when disabling gating



Since we make sure the clock is enabled in the mmc_host_clk_exit()
function we should expect a reference counter of 1, not 0.

Signed-off-by: default avatarLinus Walleij <linus.walleij@stericsson.com>
Tested-by: default avatarChris Ball <cjb@laptop.org>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 253e0a7c
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -235,7 +235,8 @@ static inline void mmc_host_clk_exit(struct mmc_host *host)
		mmc_host_clk_gate_delayed(host);
		mmc_host_clk_gate_delayed(host);
	if (host->clk_gated)
	if (host->clk_gated)
		mmc_host_clk_ungate(host);
		mmc_host_clk_ungate(host);
	BUG_ON(host->clk_requests > 0);
	/* There should be only one user now */
	WARN_ON(host->clk_requests > 1);
}
}


#else
#else