diff options
Diffstat (limited to 'drivers/cpufreq/cppc_cpufreq.c')
| -rw-r--r-- | drivers/cpufreq/cppc_cpufreq.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c index a1c3025f9df7..8300a9fcb80c 100644 --- a/drivers/cpufreq/cppc_cpufreq.c +++ b/drivers/cpufreq/cppc_cpufreq.c | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #include <linux/cpu.h> | 20 | #include <linux/cpu.h> |
| 21 | #include <linux/cpufreq.h> | 21 | #include <linux/cpufreq.h> |
| 22 | #include <linux/dmi.h> | 22 | #include <linux/dmi.h> |
| 23 | #include <linux/time.h> | ||
| 23 | #include <linux/vmalloc.h> | 24 | #include <linux/vmalloc.h> |
| 24 | 25 | ||
| 25 | #include <asm/unaligned.h> | 26 | #include <asm/unaligned.h> |
| @@ -162,6 +163,8 @@ static int cppc_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
| 162 | policy->cpuinfo.max_freq = cppc_dmi_max_khz; | 163 | policy->cpuinfo.max_freq = cppc_dmi_max_khz; |
| 163 | 164 | ||
| 164 | policy->cpuinfo.transition_latency = cppc_get_transition_latency(cpu_num); | 165 | policy->cpuinfo.transition_latency = cppc_get_transition_latency(cpu_num); |
| 166 | policy->transition_delay_us = cppc_get_transition_latency(cpu_num) / | ||
| 167 | NSEC_PER_USEC; | ||
| 165 | policy->shared_type = cpu->shared_type; | 168 | policy->shared_type = cpu->shared_type; |
| 166 | 169 | ||
| 167 | if (policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) | 170 | if (policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) |
| @@ -230,8 +233,13 @@ static int __init cppc_cpufreq_init(void) | |||
| 230 | return ret; | 233 | return ret; |
| 231 | 234 | ||
| 232 | out: | 235 | out: |
| 233 | for_each_possible_cpu(i) | 236 | for_each_possible_cpu(i) { |
| 234 | kfree(all_cpu_data[i]); | 237 | cpu = all_cpu_data[i]; |
| 238 | if (!cpu) | ||
| 239 | break; | ||
| 240 | free_cpumask_var(cpu->shared_cpu_map); | ||
| 241 | kfree(cpu); | ||
| 242 | } | ||
| 235 | 243 | ||
| 236 | kfree(all_cpu_data); | 244 | kfree(all_cpu_data); |
| 237 | return -ENODEV; | 245 | return -ENODEV; |
