|
@@ -91,7 +91,7 @@ static int setup_freqs_table(struct cpufreq_policy *policy,
|
|
struct pxa3xx_freq_info *freqs, int num)
|
|
struct pxa3xx_freq_info *freqs, int num)
|
|
{
|
|
{
|
|
struct cpufreq_frequency_table *table;
|
|
struct cpufreq_frequency_table *table;
|
|
- int i;
|
|
|
|
|
|
+ int i, ret;
|
|
|
|
|
|
table = kzalloc((num + 1) * sizeof(*table), GFP_KERNEL);
|
|
table = kzalloc((num + 1) * sizeof(*table), GFP_KERNEL);
|
|
if (table == NULL)
|
|
if (table == NULL)
|
|
@@ -108,7 +108,11 @@ static int setup_freqs_table(struct cpufreq_policy *policy,
|
|
pxa3xx_freqs_num = num;
|
|
pxa3xx_freqs_num = num;
|
|
pxa3xx_freqs_table = table;
|
|
pxa3xx_freqs_table = table;
|
|
|
|
|
|
- return cpufreq_frequency_table_cpuinfo(policy, table);
|
|
|
|
|
|
+ ret = cpufreq_frequency_table_cpuinfo(policy, table);
|
|
|
|
+ if (!ret)
|
|
|
|
+ cpufreq_frequency_table_get_attr(table, policy->cpu);
|
|
|
|
+
|
|
|
|
+ return ret;
|
|
}
|
|
}
|
|
|
|
|
|
static void __update_core_freq(struct pxa3xx_freq_info *info)
|
|
static void __update_core_freq(struct pxa3xx_freq_info *info)
|
|
@@ -229,10 +233,17 @@ static int pxa3xx_cpufreq_init(struct cpufreq_policy *policy)
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static int pxa3xx_cpufreq_exit(struct cpufreq_policy *policy)
|
|
|
|
+{
|
|
|
|
+ cpufreq_frequency_table_put_attr(policy->cpu);
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+
|
|
static struct cpufreq_driver pxa3xx_cpufreq_driver = {
|
|
static struct cpufreq_driver pxa3xx_cpufreq_driver = {
|
|
.verify = pxa3xx_cpufreq_verify,
|
|
.verify = pxa3xx_cpufreq_verify,
|
|
.target = pxa3xx_cpufreq_set,
|
|
.target = pxa3xx_cpufreq_set,
|
|
.init = pxa3xx_cpufreq_init,
|
|
.init = pxa3xx_cpufreq_init,
|
|
|
|
+ .exit = pxa3xx_cpufreq_exit,
|
|
.get = pxa3xx_cpufreq_get,
|
|
.get = pxa3xx_cpufreq_get,
|
|
.name = "pxa3xx-cpufreq",
|
|
.name = "pxa3xx-cpufreq",
|
|
};
|
|
};
|