Patch "PM / devfreq: Set scaling_max_freq to max on OPP notifier error" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    PM / devfreq: Set scaling_max_freq to max on OPP notifier error

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     pm-devfreq-set-scaling_max_freq-to-max-on-opp-notifi.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 12138e840a64b50d4e8f341112abaea61a56632f
Author: Leonard Crestez <leonard.crestez@xxxxxxx>
Date:   Thu Oct 31 23:34:19 2019 +0200

    PM / devfreq: Set scaling_max_freq to max on OPP notifier error
    
    [ Upstream commit e7cc792d00049c874010b398a27c3cc7bc8fef34 ]
    
    The devfreq_notifier_call functions will update scaling_min_freq and
    scaling_max_freq when the OPP table is updated.
    
    If fetching the maximum frequency fails then scaling_max_freq remains
    set to zero which is confusing. Set to ULONG_MAX instead so we don't
    need special handling for this case in other places.
    
    Signed-off-by: Leonard Crestez <leonard.crestez@xxxxxxx>
    Reviewed-by: Matthias Kaehlcke <mka@xxxxxxxxxxxx>
    Reviewed-by: Chanwoo Choi <cw00.choi@xxxxxxxxxxx>
    Signed-off-by: Chanwoo Choi <cw00.choi@xxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index e5c2afdc7b7f..e185c8846916 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -560,8 +560,10 @@ static int devfreq_notifier_call(struct notifier_block *nb, unsigned long type,
 		goto out;
 
 	devfreq->scaling_max_freq = find_available_max_freq(devfreq);
-	if (!devfreq->scaling_max_freq)
+	if (!devfreq->scaling_max_freq) {
+		devfreq->scaling_max_freq = ULONG_MAX;
 		goto out;
+	}
 
 	err = update_devfreq(devfreq);
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux