misc: bcm4329: moving to clk prepare APIs
Sivaram Nair [Thu, 1 Nov 2012 15:55:57 +0000 (17:55 +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: I0bd2c4b397c5836a3f0e90a7ea036a5db6a201fa
Signed-off-by: Sivaram Nair <sivaramn@nvidia.com>
Reviewed-on: http://git-master/r/162330
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Rakesh Kumar <krakesh@nvidia.com>
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>

drivers/misc/bcm4329_rfkill.c

index c898b7e..2603164 100644 (file)
@@ -58,10 +58,10 @@ static int bcm4329_bt_rfkill_set_power(void *data, bool blocked)
                if (bcm4329_rfkill->gpio_reset)
                        gpio_direction_output(bcm4329_rfkill->gpio_reset, 0);
                if (bcm4329_rfkill->bt_32k_clk)
-                       clk_disable(bcm4329_rfkill->bt_32k_clk);
+                       clk_disable_unprepare(bcm4329_rfkill->bt_32k_clk);
        } else {
                if (bcm4329_rfkill->bt_32k_clk)
-                       clk_enable(bcm4329_rfkill->bt_32k_clk);
+                       clk_prepare_enable(bcm4329_rfkill->bt_32k_clk);
                if (bcm4329_rfkill->gpio_shutdown)
                {
                        gpio_direction_output(bcm4329_rfkill->gpio_shutdown, 0);
@@ -135,7 +135,7 @@ static int bcm4329_rfkill_probe(struct platform_device *pdev)
                goto free_bcm_res;
 
        if (bcm4329_rfkill->bt_32k_clk && enable)
-               clk_enable(bcm4329_rfkill->bt_32k_clk);
+               clk_prepare_enable(bcm4329_rfkill->bt_32k_clk);
        if (bcm4329_rfkill->gpio_shutdown)
                gpio_direction_output(bcm4329_rfkill->gpio_shutdown, enable);
        if (bcm4329_rfkill->gpio_reset)
@@ -166,7 +166,7 @@ free_bcm_res:
        if (bcm4329_rfkill->gpio_reset)
                gpio_free(bcm4329_rfkill->gpio_reset);
        if (bcm4329_rfkill->bt_32k_clk && enable)
-               clk_disable(bcm4329_rfkill->bt_32k_clk);
+               clk_disable_unprepare(bcm4329_rfkill->bt_32k_clk);
        if (bcm4329_rfkill->bt_32k_clk)
                clk_put(bcm4329_rfkill->bt_32k_clk);
        kfree(bcm4329_rfkill);