pm_rps: Fix test to target original min and max
authorJeff McGee <jeff.mcgee@intel.com>
Fri, 10 Jan 2014 21:12:32 +0000 (15:12 -0600)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 10 Jan 2014 21:31:51 +0000 (22:31 +0100)
commitd0b5fd2bff7ce8ec1ada15da6ca9ed2425cbf1c5
treed2a9b1f4f1a97535020eb77b31a45dbb9548d900
parent44b5d7b3300dd7c94d09c57c95ab3a407f8b17ef
pm_rps: Fix test to target original min and max

The goal of the test is to confirm that gt_cur_freq_mhz can be forced
to the boundaries of the frequency range by collapsing gt_min_freq_mhz
and gt_max_freq_mhz to the target value. But we miss testing the upper
end of the range by targetting the current value of max after it has
been set equal to min. So fix by targetting orginal max instead of
current max.

This correction exposes a problem in setfreq where min is always set
to target before max, which should fail if the target value is greater
than max. So fix that too.

Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
tests/pm_rps.c