spi: spi-ath79: Use clk_prepare_enable and clk_disable_unprepare
authorAlban Bedel <albeu@free.fr>
Fri, 24 Apr 2015 14:19:23 +0000 (16:19 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 27 Apr 2015 14:44:57 +0000 (15:44 +0100)
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: Alban Bedel <albeu@free.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-ath79.c

index 239bc31d6791d8c1636f7f7e248627d4fb4ea9e5..b37bedd059b3ff32af11e2ee86d3abc35fc4b258 100644 (file)
@@ -249,7 +249,7 @@ static int ath79_spi_probe(struct platform_device *pdev)
                goto err_put_master;
        }
 
-       ret = clk_enable(sp->clk);
+       ret = clk_prepare_enable(sp->clk);
        if (ret)
                goto err_put_master;
 
@@ -273,7 +273,7 @@ static int ath79_spi_probe(struct platform_device *pdev)
 err_disable:
        ath79_spi_disable(sp);
 err_clk_disable:
-       clk_disable(sp->clk);
+       clk_disable_unprepare(sp->clk);
 err_put_master:
        spi_master_put(sp->bitbang.master);
 
@@ -286,7 +286,7 @@ static int ath79_spi_remove(struct platform_device *pdev)
 
        spi_bitbang_stop(&sp->bitbang);
        ath79_spi_disable(sp);
-       clk_disable(sp->clk);
+       clk_disable_unprepare(sp->clk);
        spi_master_put(sp->bitbang.master);
 
        return 0;