Lines Matching refs:new_pol
144 static int do_new_policy(unsigned int cpu, struct cpufreq_policy *new_pol) in do_new_policy() argument
154 if (!new_pol->min) in do_new_policy()
155 new_pol->min = cur_pol->min; in do_new_policy()
157 if (!new_pol->max) in do_new_policy()
158 new_pol->max = cur_pol->max; in do_new_policy()
160 if (!new_pol->governor) in do_new_policy()
161 new_pol->governor = cur_pol->governor; in do_new_policy()
163 ret = cpufreq_set_policy(cpu, new_pol); in do_new_policy()
171 static int do_one_cpu(unsigned int cpu, struct cpufreq_policy *new_pol, in do_one_cpu() argument
182 if (new_pol->min) in do_one_cpu()
183 return cpufreq_modify_policy_min(cpu, new_pol->min); in do_one_cpu()
184 else if (new_pol->max) in do_one_cpu()
185 return cpufreq_modify_policy_max(cpu, new_pol->max); in do_one_cpu()
186 else if (new_pol->governor) in do_one_cpu()
188 new_pol->governor); in do_one_cpu()
192 return do_new_policy(cpu, new_pol); in do_one_cpu()
206 struct cpufreq_policy new_pol = { in cmd_freq_set() local
228 if (new_pol.min) in cmd_freq_set()
231 new_pol.min = string_to_frequency(optarg); in cmd_freq_set()
232 if (new_pol.min == 0) { in cmd_freq_set()
238 if (new_pol.max) in cmd_freq_set()
241 new_pol.max = string_to_frequency(optarg); in cmd_freq_set()
242 if (new_pol.max == 0) { in cmd_freq_set()
257 if (new_pol.governor) in cmd_freq_set()
268 new_pol.governor = gov; in cmd_freq_set()
329 ret = do_one_cpu(cpu, &new_pol, freq, policychange); in cmd_freq_set()