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: Saravana Kannan <saravanak@google.com> Change-Id: I03adc475338c5b0376992ab40543f481b75de895 Signed-off-by: Will McVicker <willmcvicker@google.com>
This commit is contained in:
committed by
Will McVicker
parent
a5b1df00dd
commit
ace5c22c16
@@ -543,8 +543,6 @@ static int devfreq_notifier_call(struct notifier_block *nb, unsigned long type,
|
|||||||
mutex_lock(&devfreq->lock);
|
mutex_lock(&devfreq->lock);
|
||||||
|
|
||||||
devfreq->scaling_min_freq = find_available_min_freq(devfreq);
|
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);
|
devfreq->scaling_max_freq = find_available_max_freq(devfreq);
|
||||||
if (!devfreq->scaling_max_freq) {
|
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);
|
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->min_freq = devfreq->scaling_min_freq;
|
||||||
|
|
||||||
devfreq->scaling_max_freq = find_available_max_freq(devfreq);
|
devfreq->scaling_max_freq = find_available_max_freq(devfreq);
|
||||||
|
|||||||
Reference in New Issue
Block a user