Skip to content

Commit

Permalink
sata_rcar: Convert to clk_prepare/unprepare
Browse files Browse the repository at this point in the history
Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and
clk_disable_unprepare() to get ready for the migration to the common
clock framework.

Cc: linux-ide@vger.kernel.org
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
  • Loading branch information
Laurent Pinchart authored and Tejun Heo committed Oct 29, 2013
1 parent 0523f03 commit 329b428
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/ata/sata_rcar.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ static int sata_rcar_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "failed to get access to sata clock\n");
return PTR_ERR(priv->clk);
}
clk_enable(priv->clk);
clk_prepare_enable(priv->clk);

host = ata_host_alloc(&pdev->dev, 1);
if (!host) {
Expand Down Expand Up @@ -822,7 +822,7 @@ static int sata_rcar_probe(struct platform_device *pdev)
return 0;

cleanup:
clk_disable(priv->clk);
clk_disable_unprepare(priv->clk);

return ret;
}
Expand All @@ -841,7 +841,7 @@ static int sata_rcar_remove(struct platform_device *pdev)
iowrite32(0, base + SATAINTSTAT_REG);
iowrite32(0x7ff, base + SATAINTMASK_REG);

clk_disable(priv->clk);
clk_disable_unprepare(priv->clk);

return 0;
}
Expand All @@ -861,7 +861,7 @@ static int sata_rcar_suspend(struct device *dev)
/* mask */
iowrite32(0x7ff, base + SATAINTMASK_REG);

clk_disable(priv->clk);
clk_disable_unprepare(priv->clk);
}

return ret;
Expand All @@ -873,7 +873,7 @@ static int sata_rcar_resume(struct device *dev)
struct sata_rcar_priv *priv = host->private_data;
void __iomem *base = priv->base;

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

/* ack and mask */
iowrite32(0, base + SATAINTSTAT_REG);
Expand Down

0 comments on commit 329b428

Please sign in to comment.