hwmon: tegra-tsensor: moving to clk prepare APIs
Sivaram Nair [Thu, 1 Nov 2012 15:44:15 +0000 (17:44 +0200)]
The clk_enable/clk_disable pair of APIs are replaced with
clk_prepare_enable and clk_disable_unprepare.

This is needed for the migration to common clk framework.

Bug 920915

Change-Id: I1b5939d7714c21549b4e7e63c223bcac8e66f951
Signed-off-by: Sivaram Nair <sivaramn@nvidia.com>
Reviewed-on: http://git-master/r/162324
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>

drivers/hwmon/tegra-tsensor.c

index e3fef4b..1c3cbb8 100644 (file)
@@ -1462,7 +1462,7 @@ static int tsensor_clk_enable(
        struct clk *clk_m;
 
        if (enable) {
-               clk_enable(data->dev_clk);
+               clk_prepare_enable(data->dev_clk);
                rate = clk_get_rate(data->dev_clk);
                clk_m = clk_get_sys(NULL, "clk_m");
                if (clk_get_parent(data->dev_clk) != clk_m) {
@@ -1477,7 +1477,7 @@ static int tsensor_clk_enable(
                                goto fail;
                }
        } else {
-               clk_disable(data->dev_clk);
+               clk_disable_unprepare(data->dev_clk);
                clk_put(data->dev_clk);
        }
 fail: