Skip to content

Commit

Permalink
spi/sirf: use clk_prepare_enable and clk_disable_unprepare
Browse files Browse the repository at this point in the history
Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare
calls as required by common clock framework.

Signed-off-by: Barry Song <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
  • Loading branch information
21cnbao authored and glikely committed Feb 5, 2013
1 parent f305a0a commit e5118cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/spi/spi-sirf.c
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ static int spi_sirfsoc_probe(struct platform_device *pdev)
ret = -EINVAL;
goto free_pin;
}
clk_enable(sspi->clk);
clk_prepare_enable(sspi->clk);
sspi->ctrl_freq = clk_get_rate(sspi->clk);

init_completion(&sspi->done);
Expand All @@ -593,7 +593,7 @@ static int spi_sirfsoc_probe(struct platform_device *pdev)
return 0;

free_clk:
clk_disable(sspi->clk);
clk_disable_unprepare(sspi->clk);
clk_put(sspi->clk);
free_pin:
pinctrl_put(sspi->p);
Expand All @@ -617,7 +617,7 @@ static int spi_sirfsoc_remove(struct platform_device *pdev)
if (sspi->chipselect[i] > 0)
gpio_free(sspi->chipselect[i]);
}
clk_disable(sspi->clk);
clk_disable_unprepare(sspi->clk);
clk_put(sspi->clk);
pinctrl_put(sspi->p);
spi_master_put(master);
Expand Down

0 comments on commit e5118cd

Please sign in to comment.