cpufreq: Preserve sysfs min/max request
Antti P Miettinen [Thu, 5 Jan 2012 00:13:23 +0000 (02:13 +0200)]
Store the value received via sysfs as the user_policy
min/max value instead of the currently enforced min/max.
This allows restoring the user min/max values when
constraints on enforced min/max change.

Bug 888312

Change-Id: I8a5adf022585e5bd91fa3b1d8d448065efa6827a
Reviewed-on: http://git-master/r/73982
Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/75886
Reviewed-by: Automatic_Commit_Validation_User

drivers/cpufreq/cpufreq.c

index 65fba49..698bf4a 100644 (file)
@@ -390,7 +390,7 @@ static ssize_t store_##file_name                                    \
                return -EINVAL;                                         \
                                                                        \
        ret = __cpufreq_set_policy(policy, &new_policy);                \
-       policy->user_policy.object = policy->object;                    \
+       policy->user_policy.object = new_policy.object;                 \
                                                                        \
        return ret ? ret : count;                                       \
 }