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

Commit bd8ec284 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "clk: handle reentrant clk_set_rate() calls from clock supply regulators"

parents 65180211 5e1a7346
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2074,10 +2074,13 @@ static int clk_core_set_rate_nolock(struct clk_core *core,
	if ((core->flags & CLK_SET_RATE_GATE) && core->prepare_count)
		return -EBUSY;

	set_rate_nesting_count++;

	/* calculate new rates and get the topmost changed clock */
	top = clk_calc_new_rates(core, rate);
	if (!top) {
		ret = -EINVAL;
		set_rate_nesting_count--;
		goto pre_rate_change_err;
	}

@@ -2088,12 +2091,12 @@ static int clk_core_set_rate_nolock(struct clk_core *core,
				fail_clk->name, req_rate);
		clk_propagate_rate_change(top, ABORT_RATE_CHANGE);
		ret = -EBUSY;
		set_rate_nesting_count--;
		goto pre_rate_change_err;
	}


	/* change the rates */
	set_rate_nesting_count++;
	ret = clk_change_rate(top);
	set_rate_nesting_count--;
	if (ret) {