aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/clock.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-11-04 09:02:46 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-02-02 09:52:18 -0500
commit548d849574847b788fe846fe21a41386063be161 (patch)
tree6c2ac7379c376793368affab03e5202abd0f1efa /arch/arm/mach-omap2/clock.c
parentdb8ac47cfccaafd3fa4c5c15320809d44f4fcef9 (diff)
[ARM] omap: introduce clock operations structure
Collect up all the common enable/disable clock operation functions into a separate operations structure. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-omap2/clock.c')
-rw-r--r--arch/arm/mach-omap2/clock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index ad721e0cbf7a..d3213f565d5f 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -274,8 +274,8 @@ int _omap2_clk_enable(struct clk *clk)
274 if (clk->flags & (ALWAYS_ENABLED | PARENT_CONTROLS_CLOCK)) 274 if (clk->flags & (ALWAYS_ENABLED | PARENT_CONTROLS_CLOCK))
275 return 0; 275 return 0;
276 276
277 if (clk->enable) 277 if (clk->ops && clk->ops->enable)
278 return clk->enable(clk); 278 return clk->ops->enable(clk);
279 279
280 if (unlikely(clk->enable_reg == NULL)) { 280 if (unlikely(clk->enable_reg == NULL)) {
281 printk(KERN_ERR "clock.c: Enable for %s without enable code\n", 281 printk(KERN_ERR "clock.c: Enable for %s without enable code\n",
@@ -304,8 +304,8 @@ void _omap2_clk_disable(struct clk *clk)
304 if (clk->flags & (ALWAYS_ENABLED | PARENT_CONTROLS_CLOCK)) 304 if (clk->flags & (ALWAYS_ENABLED | PARENT_CONTROLS_CLOCK))
305 return; 305 return;
306 306
307 if (clk->disable) { 307 if (clk->ops && clk->ops->disable) {
308 clk->disable(clk); 308 clk->ops->disable(clk);
309 return; 309 return;
310 } 310 }
311 311