diff options
Diffstat (limited to 'arch/arm/plat-omap/clock.c')
-rw-r--r-- | arch/arm/plat-omap/clock.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index 56b6f8b7053e..8506cbb7fea4 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c | |||
@@ -441,6 +441,8 @@ static int __init clk_disable_unused(void) | |||
441 | return 0; | 441 | return 0; |
442 | 442 | ||
443 | pr_info("clock: disabling unused clocks to save power\n"); | 443 | pr_info("clock: disabling unused clocks to save power\n"); |
444 | |||
445 | spin_lock_irqsave(&clockfw_lock, flags); | ||
444 | list_for_each_entry(ck, &clocks, node) { | 446 | list_for_each_entry(ck, &clocks, node) { |
445 | if (ck->ops == &clkops_null) | 447 | if (ck->ops == &clkops_null) |
446 | continue; | 448 | continue; |
@@ -448,10 +450,9 @@ static int __init clk_disable_unused(void) | |||
448 | if (ck->usecount > 0 || !ck->enable_reg) | 450 | if (ck->usecount > 0 || !ck->enable_reg) |
449 | continue; | 451 | continue; |
450 | 452 | ||
451 | spin_lock_irqsave(&clockfw_lock, flags); | ||
452 | arch_clock->clk_disable_unused(ck); | 453 | arch_clock->clk_disable_unused(ck); |
453 | spin_unlock_irqrestore(&clockfw_lock, flags); | ||
454 | } | 454 | } |
455 | spin_unlock_irqrestore(&clockfw_lock, flags); | ||
455 | 456 | ||
456 | return 0; | 457 | return 0; |
457 | } | 458 | } |