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

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

Merge "clk: msm: clock-rpm: Allocate memory for the last-vote optimization"

parents c01124a4 aec734dc
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -391,9 +391,21 @@ static struct rpm_clk *rpm_clk_dt_parser_common(struct device *dev,
	/* Rely on whoever's called last to setup the circular ref */
	c = msmclk_lookup_phandle(dev, p);
	if (!IS_ERR(c)) {
		uint32_t *sleep = devm_kzalloc(dev, sizeof(uint32_t),
					       GFP_KERNEL);
		uint32_t *active =
			devm_kzalloc(dev, sizeof(uint32_t),
				     GFP_KERNEL);

		if (!sleep || !active)
			return ERR_PTR(-ENOMEM);
		peer = to_rpm_clk(c);
		peer->peer = rpm;
		rpm->peer = peer;
		rpm->last_active_set_vote = active;
		peer->last_active_set_vote = active;
		rpm->last_sleep_set_vote = sleep;
		peer->last_sleep_set_vote = sleep;
	}

	rpm->rpmrs_data = &clk_rpmrs_data_smd;