Skip to content

Commit

Permalink
Merge remote-tracking branch 'asoc/fix/atmel' into asoc-linus
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Brown committed Jul 23, 2013
2 parents 3b2f64d + 9a9b1c6 commit 7c9e061
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions drivers/misc/atmel-ssc.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,19 @@ EXPORT_SYMBOL(ssc_request);

void ssc_free(struct ssc_device *ssc)
{
bool disable_clk = true;

spin_lock(&user_lock);
if (ssc->user) {
if (ssc->user)
ssc->user--;
clk_disable_unprepare(ssc->clk);
} else {
else {
disable_clk = false;
dev_dbg(&ssc->pdev->dev, "device already free\n");
}
spin_unlock(&user_lock);

if (disable_clk)
clk_disable_unprepare(ssc->clk);
}
EXPORT_SYMBOL(ssc_free);

Expand Down

0 comments on commit 7c9e061

Please sign in to comment.