aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2009-01-28 14:35:09 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-02-08 12:50:45 -0500
commitbe5f34b77355b9b1720a88390e51441ef578720b (patch)
tree73ad558c0d799e75178353f16e5d37390c26f746 /arch/arm/plat-omap
parentf11fda6a9173e8e6b152ba5cb26fa20095a4c60f (diff)
[ARM] OMAP clock: drop clk_get_usecount()
This function is race-prone and mistakenly conveys the impression to drivers that it is part of the clock interface. Get rid of it: core code that absolutely needs this can just check clk->usecount. Drivers should not use it at all. linux-omap source commit is 5df9e4adc2f6a6d55aca53ee27b8baad18897c05. Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r--arch/arm/plat-omap/clock.c16
-rw-r--r--arch/arm/plat-omap/include/mach/clock.h1
2 files changed, 0 insertions, 17 deletions
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index 6a1737a74477..9833d73511a1 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -76,22 +76,6 @@ out:
76} 76}
77EXPORT_SYMBOL(clk_disable); 77EXPORT_SYMBOL(clk_disable);
78 78
79int clk_get_usecount(struct clk *clk)
80{
81 unsigned long flags;
82 int ret = 0;
83
84 if (clk == NULL || IS_ERR(clk))
85 return 0;
86
87 spin_lock_irqsave(&clockfw_lock, flags);
88 ret = clk->usecount;
89 spin_unlock_irqrestore(&clockfw_lock, flags);
90
91 return ret;
92}
93EXPORT_SYMBOL(clk_get_usecount);
94
95unsigned long clk_get_rate(struct clk *clk) 79unsigned long clk_get_rate(struct clk *clk)
96{ 80{
97 unsigned long flags; 81 unsigned long flags;
diff --git a/arch/arm/plat-omap/include/mach/clock.h b/arch/arm/plat-omap/include/mach/clock.h
index af6ae4fa46d6..0ba28462a497 100644
--- a/arch/arm/plat-omap/include/mach/clock.h
+++ b/arch/arm/plat-omap/include/mach/clock.h
@@ -124,7 +124,6 @@ extern void clk_unregister(struct clk *clk);
124extern void propagate_rate(struct clk *clk); 124extern void propagate_rate(struct clk *clk);
125extern void recalculate_root_clocks(void); 125extern void recalculate_root_clocks(void);
126extern void followparent_recalc(struct clk *clk); 126extern void followparent_recalc(struct clk *clk);
127extern int clk_get_usecount(struct clk *clk);
128extern void clk_enable_init_clocks(void); 127extern void clk_enable_init_clocks(void);
129#ifdef CONFIG_CPU_FREQ 128#ifdef CONFIG_CPU_FREQ
130extern void clk_init_cpufreq_table(struct cpufreq_frequency_table **table); 129extern void clk_init_cpufreq_table(struct cpufreq_frequency_table **table);