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

Commit ace5c22c authored by Saravana Kannan's avatar Saravana Kannan Committed by Will McVicker
Browse files

ANDROID: GKI: PM / devfreq: Allow min freq to be 0



Some vendors have devfreq devices that allow min freq to be 0. So, allow
that.

Bug: 152343889
Signed-off-by: default avatarSaravana Kannan <saravanak@google.com>
Change-Id: I03adc475338c5b0376992ab40543f481b75de895
Signed-off-by: default avatarWill McVicker <willmcvicker@google.com>
parent a5b1df00
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -543,8 +543,6 @@ static int devfreq_notifier_call(struct notifier_block *nb, unsigned long type,
	mutex_lock(&devfreq->lock);

	devfreq->scaling_min_freq = find_available_min_freq(devfreq);
	if (!devfreq->scaling_min_freq)
		goto out;

	devfreq->scaling_max_freq = find_available_max_freq(devfreq);
	if (!devfreq->scaling_max_freq) {
@@ -648,11 +646,6 @@ struct devfreq *devfreq_add_device(struct device *dev,
	}

	devfreq->scaling_min_freq = find_available_min_freq(devfreq);
	if (!devfreq->scaling_min_freq) {
		mutex_unlock(&devfreq->lock);
		err = -EINVAL;
		goto err_dev;
	}
	devfreq->min_freq = devfreq->scaling_min_freq;

	devfreq->scaling_max_freq = find_available_max_freq(devfreq);