[ARM] OMAP clock: drop clk_get_usecount()
authorPaul Walmsley <paul@pwsan.com>
Wed, 28 Jan 2009 19:35:09 +0000 (12:35 -0700)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 8 Feb 2009 17:50:45 +0000 (17:50 +0000)
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>
arch/arm/plat-omap/clock.c
arch/arm/plat-omap/include/mach/clock.h

index 6a1737a74477a9c033d9e8bb01aac23bfcc497ce..9833d73511a196850a7e48b5ef235562d3a4f05a 100644 (file)
@@ -76,22 +76,6 @@ out:
 }
 EXPORT_SYMBOL(clk_disable);
 
-int clk_get_usecount(struct clk *clk)
-{
-       unsigned long flags;
-       int ret = 0;
-
-       if (clk == NULL || IS_ERR(clk))
-               return 0;
-
-       spin_lock_irqsave(&clockfw_lock, flags);
-       ret = clk->usecount;
-       spin_unlock_irqrestore(&clockfw_lock, flags);
-
-       return ret;
-}
-EXPORT_SYMBOL(clk_get_usecount);
-
 unsigned long clk_get_rate(struct clk *clk)
 {
        unsigned long flags;
index af6ae4fa46d650e0e806ee3e1b6fde9cc681f52e..0ba28462a497e61cac139fb28aa9322cc469cfe2 100644 (file)
@@ -124,7 +124,6 @@ extern void clk_unregister(struct clk *clk);
 extern void propagate_rate(struct clk *clk);
 extern void recalculate_root_clocks(void);
 extern void followparent_recalc(struct clk *clk);
-extern int clk_get_usecount(struct clk *clk);
 extern void clk_enable_init_clocks(void);
 #ifdef CONFIG_CPU_FREQ
 extern void clk_init_cpufreq_table(struct cpufreq_frequency_table **table);