Skip to content

Commit

Permalink
clk: vt8500: Fix unbalanced spinlock in vt8500_dclk_set_rate()
Browse files Browse the repository at this point in the history
With the addition of a DVO clock, a bug is now evident in the vt8500
clock code:
[    0.290000] WARNING: at init/main.c:698 do_one_initcall+0x158/0x18c()
[    0.300000] initcall wm8505fb_driver_init+0x0/0xc returned with disabled int

This is caused by an unbalanced spinlock in vt8500_dclk_set_rate().
Replace the second call to spin_lock_irqsave() with spin_unlock_irqrestore().

Signed-off-by: Tony Prisk <[email protected]>
Signed-off-by: Mike Turquette <[email protected]>
  • Loading branch information
tonyprisk authored and Mike Turquette committed May 29, 2013
1 parent 6532cb7 commit 419e321
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/clk/clk-vt8500.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ static int vt8500_dclk_set_rate(struct clk_hw *hw, unsigned long rate,
writel(divisor, cdev->div_reg);
vt8500_pmc_wait_busy();

spin_lock_irqsave(cdev->lock, flags);
spin_unlock_irqrestore(cdev->lock, flags);

return 0;
}
Expand Down

0 comments on commit 419e321

Please sign in to comment.