spi/sirf: use clk_prepare_enable and clk_disable_unprepare
authorBarry Song <Baohua.Song@csr.com>
Wed, 26 Dec 2012 02:48:33 +0000 (10:48 +0800)
committerGrant Likely <grant.likely@secretlab.ca>
Tue, 5 Feb 2013 12:43:00 +0000 (12:43 +0000)
Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare
calls as required by common clock framework.

Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/spi/spi-sirf.c

index 7506667..1f04979 100644 (file)
@@ -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);
@@ -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);
@@ -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);