Skip to content

Commit

Permalink
ASoC: atmel-ssc: prepare clk before calling enable
Browse files Browse the repository at this point in the history
Replace clk_enable/disable with clk_prepare_enable/disable_unprepare to
avoid common clk framework warnings.

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Boris BREZILLON authored and Mark Brown committed Jun 7, 2013
1 parent 9b74fad commit 6f0d947
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/misc/atmel-ssc.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ struct ssc_device *ssc_request(unsigned int ssc_num)
ssc->user++;
spin_unlock(&user_lock);

clk_enable(ssc->clk);
clk_prepare_enable(ssc->clk);

return ssc;
}
Expand All @@ -69,7 +69,7 @@ void ssc_free(struct ssc_device *ssc)
spin_lock(&user_lock);
if (ssc->user) {
ssc->user--;
clk_disable(ssc->clk);
clk_disable_unprepare(ssc->clk);
} else {
dev_dbg(&ssc->pdev->dev, "device already free\n");
}
Expand Down Expand Up @@ -172,10 +172,10 @@ static int ssc_probe(struct platform_device *pdev)
}

/* disable all interrupts */
clk_enable(ssc->clk);
clk_prepare_enable(ssc->clk);
ssc_writel(ssc->regs, IDR, -1);
ssc_readl(ssc->regs, SR);
clk_disable(ssc->clk);
clk_disable_unprepare(ssc->clk);

ssc->irq = platform_get_irq(pdev, 0);
if (!ssc->irq) {
Expand Down

0 comments on commit 6f0d947

Please sign in to comment.