longrun.c (75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37) longrun.c (1e4f63aecb53e48468661e922fc2fa3b83e55722)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * (C) 2002 - 2003 Dominik Brodowski <linux@brodo.de>
4 *
5 * BIG FAT DISCLAIMER: Work in progress code. Possibly *dangerous*
6 */
7
8#include <linux/kernel.h>

--- 108 unchanged lines hidden (view full) ---

117
118/**
119 * longrun_verify_poliy - verifies a new CPUFreq policy
120 * @policy: the policy to verify
121 *
122 * Validates a new CPUFreq policy. This function has to be called with
123 * cpufreq_driver locked.
124 */
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * (C) 2002 - 2003 Dominik Brodowski <linux@brodo.de>
4 *
5 * BIG FAT DISCLAIMER: Work in progress code. Possibly *dangerous*
6 */
7
8#include <linux/kernel.h>

--- 108 unchanged lines hidden (view full) ---

117
118/**
119 * longrun_verify_poliy - verifies a new CPUFreq policy
120 * @policy: the policy to verify
121 *
122 * Validates a new CPUFreq policy. This function has to be called with
123 * cpufreq_driver locked.
124 */
125static int longrun_verify_policy(struct cpufreq_policy *policy)
125static int longrun_verify_policy(struct cpufreq_policy_data *policy)
126{
127 if (!policy)
128 return -EINVAL;
129
130 policy->cpu = 0;
131 cpufreq_verify_within_cpu_limits(policy);
132
126{
127 if (!policy)
128 return -EINVAL;
129
130 policy->cpu = 0;
131 cpufreq_verify_within_cpu_limits(policy);
132
133 if ((policy->policy != CPUFREQ_POLICY_POWERSAVE) &&
134 (policy->policy != CPUFREQ_POLICY_PERFORMANCE))
135 return -EINVAL;
136
137 return 0;
138}
139
140static unsigned int longrun_get(unsigned int cpu)
141{
142 u32 eax, ebx, ecx, edx;
143
144 if (cpu)

--- 178 unchanged lines hidden ---
133 return 0;
134}
135
136static unsigned int longrun_get(unsigned int cpu)
137{
138 u32 eax, ebx, ecx, edx;
139
140 if (cpu)

--- 178 unchanged lines hidden ---