aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/clock.c
diff options
context:
space:
mode:
authorRajendra Nayak <rnayak@ti.com>2012-09-22 04:24:17 -0400
committerPaul Walmsley <paul@pwsan.com>2012-09-22 12:52:56 -0400
commit5dcc3b975e972989574c009457f0e333c342910d (patch)
tree1e8c96d112b329fd5fface92d6a1a74d79f2a6ef /arch/arm/mach-omap2/clock.c
parent6ea74cb9853e923f8945586cd9ccdd42e6f00ba9 (diff)
ARM: OMAP2+: clock: Remove all direct dereferencing of struct clk
While we move to Common Clk Framework (CCF), direct deferencing of struct clk wouldn't be possible anymore. Hence get rid of all such instances in the current clock code and use macros/helpers similar to the ones that are provided by CCF. While here also concatenate some strings split across multiple lines which seem to be needed anyway. Signed-off-by: Rajendra Nayak <rnayak@ti.com> [paul@pwsan.com: simplified some compound expressions; reformatted some messages] Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'arch/arm/mach-omap2/clock.c')
-rw-r--r--arch/arm/mach-omap2/clock.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index 1a1f97f3ca69..fbcd82b8a7d0 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -78,7 +78,7 @@ static void _omap2_module_wait_ready(struct clk *clk)
78 clk->ops->find_idlest(clk, &idlest_reg, &idlest_bit, &idlest_val); 78 clk->ops->find_idlest(clk, &idlest_reg, &idlest_bit, &idlest_val);
79 79
80 omap2_cm_wait_idlest(idlest_reg, (1 << idlest_bit), idlest_val, 80 omap2_cm_wait_idlest(idlest_reg, (1 << idlest_bit), idlest_val,
81 clk->name); 81 __clk_get_name(clk));
82} 82}
83 83
84/* Public functions */ 84/* Public functions */
@@ -94,18 +94,21 @@ static void _omap2_module_wait_ready(struct clk *clk)
94void omap2_init_clk_clkdm(struct clk *clk) 94void omap2_init_clk_clkdm(struct clk *clk)
95{ 95{
96 struct clockdomain *clkdm; 96 struct clockdomain *clkdm;
97 const char *clk_name;
97 98
98 if (!clk->clkdm_name) 99 if (!clk->clkdm_name)
99 return; 100 return;
100 101
102 clk_name = __clk_get_name(clk);
103
101 clkdm = clkdm_lookup(clk->clkdm_name); 104 clkdm = clkdm_lookup(clk->clkdm_name);
102 if (clkdm) { 105 if (clkdm) {
103 pr_debug("clock: associated clk %s to clkdm %s\n", 106 pr_debug("clock: associated clk %s to clkdm %s\n",
104 clk->name, clk->clkdm_name); 107 clk_name, clk->clkdm_name);
105 clk->clkdm = clkdm; 108 clk->clkdm = clkdm;
106 } else { 109 } else {
107 pr_debug("clock: could not associate clk %s to " 110 pr_debug("clock: could not associate clk %s to clkdm %s\n",
108 "clkdm %s\n", clk->name, clk->clkdm_name); 111 clk_name, clk->clkdm_name);
109 } 112 }
110} 113}
111 114