Commit cb53417e authored by Prashant Gaikwad's avatar Prashant Gaikwad Committed by Stephen Warren

spi/tegra: add clk_prepare/clk_unprepare

Use clk_prepare/clk_unprepare as required by the generic clk framework.

Cc: grant.likely@secretlab.ca
cc: spi-devel-general@lists.sourceforge.net
Signed-off-by: default avatarPrashant Gaikwad <pgaikwad@nvidia.com>
Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
parent f762470b
...@@ -261,7 +261,7 @@ static void spi_tegra_start_transfer(struct spi_device *spi, ...@@ -261,7 +261,7 @@ static void spi_tegra_start_transfer(struct spi_device *spi,
clk_set_rate(tspi->clk, speed); clk_set_rate(tspi->clk, speed);
if (tspi->cur_speed == 0) if (tspi->cur_speed == 0)
clk_enable(tspi->clk); clk_prepare_enable(tspi->clk);
tspi->cur_speed = speed; tspi->cur_speed = speed;
...@@ -373,7 +373,7 @@ static void tegra_spi_rx_dma_complete(struct tegra_dma_req *req) ...@@ -373,7 +373,7 @@ static void tegra_spi_rx_dma_complete(struct tegra_dma_req *req)
spi = m->state; spi = m->state;
spi_tegra_start_message(spi, m); spi_tegra_start_message(spi, m);
} else { } else {
clk_disable(tspi->clk); clk_disable_unprepare(tspi->clk);
tspi->cur_speed = 0; tspi->cur_speed = 0;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment