Skip to content
Commit 3baa976a authored by Xiaoguang Chen's avatar Xiaoguang Chen Committed by Rafael J. Wysocki
Browse files

cpufreq: conservative: fix requested_freq reduction issue



When decreasing frequency, requested_freq may be less than
freq_target, So requested_freq minus freq_target may be negative,
But reqested_freq's unit is unsigned int, then the negative result
will be one larger interger which may be even higher than
requested_freq.

This patch is to fix such issue. when result becomes negative,
set requested_freq as the min value of policy.

Signed-off-by: default avatarXiaoguang Chen <chenxg@marvell.com>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent fbbcdc07
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment