Merge branch 'clk-fixes' into clk-next
authorStephen Boyd <sboyd@codeaurora.org>
Thu, 7 May 2015 18:32:49 +0000 (11:32 -0700)
committerStephen Boyd <sboyd@codeaurora.org>
Thu, 7 May 2015 18:32:49 +0000 (11:32 -0700)
1  2 
drivers/clk/clk.c

index 4a2e9478edbd1b1105693c7f6ffc1789c3c62c0d,5b0f41868b425672e6295ac6b30a52e43cf5730c..9e9d18cadeeef8f0144a99bae95594759f76346e
@@@ -1095,10 -1473,12 +1095,12 @@@ static struct clk_core *__clk_set_paren
         *
         * See also: Comment for clk_set_parent() below.
         */
 -      if (clk->prepare_count) {
 +      if (core->prepare_count) {
                clk_core_prepare(parent);
+               flags = clk_enable_lock();
                clk_core_enable(parent);
 -              clk_core_enable(clk);
 +              clk_core_enable(core);
+               clk_enable_unlock(flags);
        }
  
        /* update the clk tree topology */
@@@ -1143,12 -1527,14 +1149,14 @@@ static int __clk_set_parent(struct clk_
  
        if (ret) {
                flags = clk_enable_lock();
 -              clk_reparent(clk, old_parent);
 +              clk_reparent(core, old_parent);
                clk_enable_unlock(flags);
  
 -              if (clk->prepare_count) {
 +              if (core->prepare_count) {
+                       flags = clk_enable_lock();
 -                      clk_core_disable(clk);
 +                      clk_core_disable(core);
                        clk_core_disable(parent);
+                       clk_enable_unlock(flags);
                        clk_core_unprepare(parent);
                }
                return ret;