summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/spear-cpufreq.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-04-08 13:28:02 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-04-08 13:28:02 +0200
commitfe10739284bae68b57d3dbcad81f34772cfd2716 (patch)
tree896fa694b7f6a46266ff8eb5291c35781be53e25 /drivers/cpufreq/spear-cpufreq.c
parentMerge branch 'pm-cpuidle' (diff)
parentcpufreq: ppc: Remove duplicate inclusion of fsl_soc.h (diff)
downloadlinux-fe10739284bae68b57d3dbcad81f34772cfd2716.tar.xz
linux-fe10739284bae68b57d3dbcad81f34772cfd2716.zip
Merge branch 'pm-cpufreq'
* pm-cpufreq: cpufreq: ppc: Remove duplicate inclusion of fsl_soc.h cpufreq: create another field .flags in cpufreq_frequency_table cpufreq: use kzalloc() to allocate memory for cpufreq_frequency_table cpufreq: don't print value of .driver_data from core cpufreq: ia64: don't set .driver_data to index cpufreq: powernv: Select CPUFreq related Kconfig options for powernv cpufreq: powernv: Use cpufreq_frequency_table.driver_data to store pstate ids cpufreq: powernv: cpufreq driver for powernv platform cpufreq: at32ap: don't declare local variable as static cpufreq: loongson2_cpufreq: don't declare local variable as static cpufreq: unicore32: fix typo issue for 'clk' cpufreq: exynos: Disable on multiplatform build
Diffstat (limited to 'drivers/cpufreq/spear-cpufreq.c')
-rw-r--r--drivers/cpufreq/spear-cpufreq.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/cpufreq/spear-cpufreq.c b/drivers/cpufreq/spear-cpufreq.c
index 4cfdcff8a310..38678396636d 100644
--- a/drivers/cpufreq/spear-cpufreq.c
+++ b/drivers/cpufreq/spear-cpufreq.c
@@ -195,18 +195,15 @@ static int spear_cpufreq_probe(struct platform_device *pdev)
cnt = prop->length / sizeof(u32);
val = prop->value;
- freq_tbl = kmalloc(sizeof(*freq_tbl) * (cnt + 1), GFP_KERNEL);
+ freq_tbl = kzalloc(sizeof(*freq_tbl) * (cnt + 1), GFP_KERNEL);
if (!freq_tbl) {
ret = -ENOMEM;
goto out_put_node;
}
- for (i = 0; i < cnt; i++) {
- freq_tbl[i].driver_data = i;
+ for (i = 0; i < cnt; i++)
freq_tbl[i].frequency = be32_to_cpup(val++);
- }
- freq_tbl[i].driver_data = i;
freq_tbl[i].frequency = CPUFREQ_TABLE_END;
spear_cpufreq.freq_tbl = freq_tbl;