[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>
This commit is contained in:
committed by
Russell King
parent
db8ac47cfc
commit
548d849574
@@ -274,8 +274,8 @@ int _omap2_clk_enable(struct clk *clk)
|
||||
if (clk->flags & (ALWAYS_ENABLED | PARENT_CONTROLS_CLOCK))
|
||||
return 0;
|
||||
|
||||
if (clk->enable)
|
||||
return clk->enable(clk);
|
||||
if (clk->ops && clk->ops->enable)
|
||||
return clk->ops->enable(clk);
|
||||
|
||||
if (unlikely(clk->enable_reg == NULL)) {
|
||||
printk(KERN_ERR "clock.c: Enable for %s without enable code\n",
|
||||
@@ -304,8 +304,8 @@ void _omap2_clk_disable(struct clk *clk)
|
||||
if (clk->flags & (ALWAYS_ENABLED | PARENT_CONTROLS_CLOCK))
|
||||
return;
|
||||
|
||||
if (clk->disable) {
|
||||
clk->disable(clk);
|
||||
if (clk->ops && clk->ops->disable) {
|
||||
clk->ops->disable(clk);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user