diff options
-rw-r--r-- | arch/arm/mach-omap2/clock.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index e9625fcf6390..b1875965bb51 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c | |||
@@ -261,7 +261,8 @@ void omap2_clk_disable(struct clk *clk) | |||
261 | 261 | ||
262 | pr_debug("clock: %s: disabling in hardware\n", clk->name); | 262 | pr_debug("clock: %s: disabling in hardware\n", clk->name); |
263 | 263 | ||
264 | clk->ops->disable(clk); | 264 | if (clk->ops && clk->ops->disable) |
265 | clk->ops->disable(clk); | ||
265 | 266 | ||
266 | if (clk->clkdm) | 267 | if (clk->clkdm) |
267 | clkdm_clk_disable(clk->clkdm, clk); | 268 | clkdm_clk_disable(clk->clkdm, clk); |
@@ -312,10 +313,13 @@ int omap2_clk_enable(struct clk *clk) | |||
312 | } | 313 | } |
313 | } | 314 | } |
314 | 315 | ||
315 | ret = clk->ops->enable(clk); | 316 | if (clk->ops && clk->ops->enable) { |
316 | if (ret) { | 317 | ret = clk->ops->enable(clk); |
317 | WARN(1, "clock: %s: could not enable: %d\n", clk->name, ret); | 318 | if (ret) { |
318 | goto oce_err3; | 319 | WARN(1, "clock: %s: could not enable: %d\n", |
320 | clk->name, ret); | ||
321 | goto oce_err3; | ||
322 | } | ||
319 | } | 323 | } |
320 | 324 | ||
321 | return 0; | 325 | return 0; |