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

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

Merge "devfreq: devfreq_simple_dev: call clk_round_rate in dev_target"

parents 857307fa 6955f760
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -61,9 +61,18 @@ static void find_freq(struct devfreq_dev_profile *p, unsigned long *freq,
static int dev_target(struct device *dev, unsigned long *freq, u32 flags)
{
	struct dev_data *d = dev_get_drvdata(dev);
	unsigned long rfreq;

	find_freq(&d->profile, freq, flags);
	return clk_set_rate(d->clk, *freq * 1000);

	rfreq = clk_round_rate(d->clk, *freq * 1000);
	if (IS_ERR_VALUE(rfreq)) {
		dev_err(dev, "devfreq: Cannot find matching frequency for %lu\n",
			*freq);
		return rfreq;
	}

	return clk_set_rate(d->clk, rfreq);
}

static int dev_get_cur_freq(struct device *dev, unsigned long *freq)