提交 3e19acdc 编写于 作者: A Alban Bedel 提交者: Mark Brown

spi: spi-ath79: Use clk_prepare_enable and clk_disable_unprepare

Clocks should be prepared and unprepared, fix this by using
clk_prepare_enable() and clk_disable_unprepare() instead of
clk_enable() and clk_disable().
Signed-off-by: NAlban Bedel <albeu@free.fr>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 85f62476
...@@ -249,7 +249,7 @@ static int ath79_spi_probe(struct platform_device *pdev) ...@@ -249,7 +249,7 @@ static int ath79_spi_probe(struct platform_device *pdev)
goto err_put_master; goto err_put_master;
} }
ret = clk_enable(sp->clk); ret = clk_prepare_enable(sp->clk);
if (ret) if (ret)
goto err_put_master; goto err_put_master;
...@@ -273,7 +273,7 @@ static int ath79_spi_probe(struct platform_device *pdev) ...@@ -273,7 +273,7 @@ static int ath79_spi_probe(struct platform_device *pdev)
err_disable: err_disable:
ath79_spi_disable(sp); ath79_spi_disable(sp);
err_clk_disable: err_clk_disable:
clk_disable(sp->clk); clk_disable_unprepare(sp->clk);
err_put_master: err_put_master:
spi_master_put(sp->bitbang.master); spi_master_put(sp->bitbang.master);
...@@ -286,7 +286,7 @@ static int ath79_spi_remove(struct platform_device *pdev) ...@@ -286,7 +286,7 @@ static int ath79_spi_remove(struct platform_device *pdev)
spi_bitbang_stop(&sp->bitbang); spi_bitbang_stop(&sp->bitbang);
ath79_spi_disable(sp); ath79_spi_disable(sp);
clk_disable(sp->clk); clk_disable_unprepare(sp->clk);
spi_master_put(sp->bitbang.master); spi_master_put(sp->bitbang.master);
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册