linux-omap 2.6.39: sync with meta-texasinstruments
[openembedded.git] / recipes / linux / linux-omap-2.6.39 / pm / linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes / 0001-OMAP2-cpufreq-free-up-table-on-exit.patch
blob86eafe37e8e08eefd19b6b2c55f085c0e0dd4ec1
1 From 8812fba541092702d6a40ea23ff60bcb504365fd Mon Sep 17 00:00:00 2001
2 From: Nishanth Menon <nm@ti.com>
3 Date: Thu, 12 May 2011 07:59:52 -0500
4 Subject: [PATCH 1/6] OMAP2+: cpufreq: free up table on exit
6 freq_table allocated by opp_init_cpufreq_table in omap_cpu_init
7 needs to be freed in omap_cpu_exit.
9 Signed-off-by: Nishanth Menon <nm@ti.com>
10 Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
11 ---
12 arch/arm/mach-omap2/omap2plus-cpufreq.c | 3 +++
13 1 files changed, 3 insertions(+), 0 deletions(-)
15 diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c
16 index d53ce23..e38ebb8 100644
17 --- a/arch/arm/mach-omap2/omap2plus-cpufreq.c
18 +++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c
19 @@ -26,6 +26,7 @@
20 #include <linux/clk.h>
21 #include <linux/io.h>
22 #include <linux/opp.h>
23 +#include <linux/slab.h>
24 #include <linux/cpu.h>
26 #include <asm/system.h>
27 @@ -216,6 +217,8 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
28 static int omap_cpu_exit(struct cpufreq_policy *policy)
30 clk_exit_cpufreq_table(&freq_table);
31 + kfree(freq_table);
32 + freq_table = NULL;
33 clk_put(mpu_clk);
34 return 0;
36 --
37 1.6.6.1