Skip to content
  1. Mar 26, 2015
  2. Mar 25, 2015
  3. Mar 24, 2015
  4. Mar 21, 2015
  5. Mar 13, 2015
  6. Mar 12, 2015
    • Shawn Guo's avatar
      ASoC: kirkwood: fix struct clk pointer comparing · aaa6d062
      Shawn Guo authored
      Since commit 035a61c3 ("clk: Make clk API return per-user struct clk
      instances"), clk API users can no longer check if two struct clk
      pointers are pointing to the same hardware clock, i.e. struct clk_hw, by
      simply comparing two pointers.  That's because with the per-user clk
      change, a brand new struct clk is created whenever clients try to look
      up the clock by calling clk_get() or sister functions like clk_get_sys()
      and of_clk_get().  This changes the original behavior where the struct
      clk is only created for once when clock driver registers the clock to
      CCF in the first place.  The net change here is before commit
      035a61c3
      
       the struct clk pointer is unique for given hardware
      clock, while after the commit the pointers returned by clk lookup calls
      become different for the same hardware clock.
      
      That said, the struct clk pointer comparing in the code doesn't work any
      more.  Call helper function clk_is_match() instead to fix the problem.
      
      Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: default avatarMichael Turquette <mturquette@linaro.org>
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      aaa6d062
    • Shawn Guo's avatar
      ASoC: fsl_spdif: fix struct clk pointer comparing · 81efec85
      Shawn Guo authored
      Since commit 035a61c3 ("clk: Make clk API return per-user struct clk
      instances"), clk API users can no longer check if two struct clk
      pointers are pointing to the same hardware clock, i.e. struct clk_hw, by
      simply comparing two pointers.  That's because with the per-user clk
      change, a brand new struct clk is created whenever clients try to look
      up the clock by calling clk_get() or sister functions like clk_get_sys()
      and of_clk_get().  This changes the original behavior where the struct
      clk is only created for once when clock driver registers the clock to
      CCF in the first place.  The net change here is before commit
      035a61c3
      
       the struct clk pointer is unique for given hardware
      clock, while after the commit the pointers returned by clk lookup calls
      become different for the same hardware clock.
      
      That said, the struct clk pointer comparing in the code doesn't work any
      more.  Call helper function clk_is_match() instead to fix the problem.
      
      Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: default avatarMichael Turquette <mturquette@linaro.org>
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      81efec85
    • Shawn Guo's avatar
      ARM: imx: fix struct clk pointer comparing · a51139fd
      Shawn Guo authored
      Since commit 035a61c3 ("clk: Make clk API return per-user struct clk
      instances"), clk API users can no longer check if two struct clk
      pointers are pointing to the same hardware clock, i.e. struct clk_hw, by
      simply comparing two pointers.  That's because with the per-user clk
      change, a brand new struct clk is created whenever clients try to look
      up the clock by calling clk_get() or sister functions like clk_get_sys()
      and of_clk_get().  This changes the original behavior where the struct
      clk is only created for once when clock driver registers the clock to
      CCF in the first place.  The net change here is before commit
      035a61c3
      
       the struct clk pointer is unique for given hardware
      clock, while after the commit the pointers returned by clk lookup calls
      become different for the same hardware clock.
      
      That said, the struct clk pointer comparing in the code doesn't work any
      more.  Call helper function clk_is_match() instead to fix the problem.
      
      Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: default avatarMichael Turquette <mturquette@linaro.org>
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      a51139fd
    • Michael Turquette's avatar
      clk: introduce clk_is_match · 3d3801ef
      Michael Turquette authored
      Some drivers compare struct clk pointers as a means of knowing
      if the two pointers reference the same clock hardware. This behavior is
      dubious (drivers must not dereference struct clk), but did not cause any
      regressions until the per-user struct clk patch was merged. Now the test
      for matching clk's will always fail with per-user struct clk's.
      
      clk_is_match is introduced to fix the regression and prevent drivers
      from comparing the pointers manually.
      
      Fixes: 035a61c3
      
       ("clk: Make clk API return per-user struct clk instances")
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Shawn Guo <shawn.guo@linaro.org>
      Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>
      Signed-off-by: default avatarMichael Turquette <mturquette@linaro.org>
      [arnd@arndb.de: Fix COMMON_CLK=N && HAS_CLK=Y config]
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      [sboyd@codeaurora.org: const arguments to clk_is_match() and
      remove unnecessary ternary operation]
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      3d3801ef
    • Julia Lawall's avatar
      clk: don't export static symbol · f55ac065
      Julia Lawall authored
      The semantic patch that fixes this problem is as follows:
      (http://coccinelle.lip6.fr/
      
      )
      
      // <smpl>
      @r@
      type T;
      identifier f;
      @@
      
      static T f (...) { ... }
      
      @@
      identifier r.f;
      declarer name EXPORT_SYMBOL_GPL;
      @@
      
      -EXPORT_SYMBOL_GPL(f);
      // </smpl>
      
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Fixes: 035a61c3
      
       "clk: Make clk API return per-user struct clk instances"
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      f55ac065