diff options
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index fcb86dd8903d..893dbaf386fb 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -1626,43 +1626,6 @@ error_out: | |||
1626 | } | 1626 | } |
1627 | 1627 | ||
1628 | /** | 1628 | /** |
1629 | * cpufreq_set_policy - set a new CPUFreq policy | ||
1630 | * @policy: policy to be set. | ||
1631 | * | ||
1632 | * Sets a new CPU frequency and voltage scaling policy. | ||
1633 | */ | ||
1634 | int cpufreq_set_policy(struct cpufreq_policy *policy) | ||
1635 | { | ||
1636 | int ret = 0; | ||
1637 | struct cpufreq_policy *data; | ||
1638 | |||
1639 | if (!policy) | ||
1640 | return -EINVAL; | ||
1641 | |||
1642 | data = cpufreq_cpu_get(policy->cpu); | ||
1643 | if (!data) | ||
1644 | return -EINVAL; | ||
1645 | |||
1646 | if (unlikely(lock_policy_rwsem_write(policy->cpu))) | ||
1647 | return -EINVAL; | ||
1648 | |||
1649 | |||
1650 | ret = __cpufreq_set_policy(data, policy); | ||
1651 | data->user_policy.min = data->min; | ||
1652 | data->user_policy.max = data->max; | ||
1653 | data->user_policy.policy = data->policy; | ||
1654 | data->user_policy.governor = data->governor; | ||
1655 | |||
1656 | unlock_policy_rwsem_write(policy->cpu); | ||
1657 | |||
1658 | cpufreq_cpu_put(data); | ||
1659 | |||
1660 | return ret; | ||
1661 | } | ||
1662 | EXPORT_SYMBOL(cpufreq_set_policy); | ||
1663 | |||
1664 | |||
1665 | /** | ||
1666 | * cpufreq_update_policy - re-evaluate an existing cpufreq policy | 1629 | * cpufreq_update_policy - re-evaluate an existing cpufreq policy |
1667 | * @cpu: CPU which shall be re-evaluated | 1630 | * @cpu: CPU which shall be re-evaluated |
1668 | * | 1631 | * |