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

Commit 34e452a1 authored by Peter De Schrijver's avatar Peter De Schrijver Committed by Mike Turquette
Browse files

clk: honor CLK_GET_RATE_NOCACHE in clk_set_rate



clk_set_rate() uses clk->rate directly. This causes problems if the clock
is marked as CLK_GET_RATE_NOCACHE. Hence call clk_get_rate() to get the
current rate.

Signed-off-by: default avatarPeter De Schrijver <pdeschrijver@nvidia.com>
Signed-off-by: default avatarMike Turquette <mturquette@linaro.org>
parent 670decdd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1216,7 +1216,7 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
	clk_prepare_lock();

	/* bail early if nothing to do */
	if (rate == clk->rate)
	if (rate == clk_get_rate(clk))
		goto out;

	if ((clk->flags & CLK_SET_RATE_GATE) && clk->prepare_count) {