diff options
author | Paul Walmsley <paul@pwsan.com> | 2010-01-08 17:23:16 -0500 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2010-01-08 17:23:16 -0500 |
commit | 4e37c10d8a721b19933491df7af296aac9281004 (patch) | |
tree | 3a82d2f29a5e82a700400ff9d48a87f5c114f6c1 /arch/arm/plat-omap/clock.c | |
parent | ca6eccb31ef63722b35ea695f75089adeec319d7 (diff) |
OMAP clock/CPUFreq: add clk_exit_cpufreq_table()
A subsequent patch adds code on OMAP2xxx to dynamically allocate the
CPUFreq frequency table in clk_init_cpufreq_table(), so for it to
avoid a leak, it will need a corresponding function to free the
memory. This patch adds clk_exit_cpufreq_table() with generic
code to call a chip-specific variant inside the clockfw_lock spinlock via
struct clk_functions.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/plat-omap/clock.c')
-rw-r--r-- | arch/arm/plat-omap/clock.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index a64d84c3d80e..d9f8c844c385 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c | |||
@@ -329,6 +329,16 @@ void clk_init_cpufreq_table(struct cpufreq_frequency_table **table) | |||
329 | arch_clock->clk_init_cpufreq_table(table); | 329 | arch_clock->clk_init_cpufreq_table(table); |
330 | spin_unlock_irqrestore(&clockfw_lock, flags); | 330 | spin_unlock_irqrestore(&clockfw_lock, flags); |
331 | } | 331 | } |
332 | |||
333 | void clk_exit_cpufreq_table(struct cpufreq_frequency_table **table) | ||
334 | { | ||
335 | unsigned long flags; | ||
336 | |||
337 | spin_lock_irqsave(&clockfw_lock, flags); | ||
338 | if (arch_clock->clk_exit_cpufreq_table) | ||
339 | arch_clock->clk_exit_cpufreq_table(table); | ||
340 | spin_unlock_irqrestore(&clockfw_lock, flags); | ||
341 | } | ||
332 | #endif | 342 | #endif |
333 | 343 | ||
334 | /*-------------------------------------------------------------------------*/ | 344 | /*-------------------------------------------------------------------------*/ |