aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/cpu/clock.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/kernel/cpu/clock.c')
-rw-r--r--arch/sh/kernel/cpu/clock.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/arch/sh/kernel/cpu/clock.c b/arch/sh/kernel/cpu/clock.c
index b5f1e23ed57c..f5eb56e6bc59 100644
--- a/arch/sh/kernel/cpu/clock.c
+++ b/arch/sh/kernel/cpu/clock.c
@@ -88,7 +88,7 @@ static void propagate_rate(struct clk *clk)
88 } 88 }
89} 89}
90 90
91int __clk_enable(struct clk *clk) 91static int __clk_enable(struct clk *clk)
92{ 92{
93 /* 93 /*
94 * See if this is the first time we're enabling the clock, some 94 * See if this is the first time we're enabling the clock, some
@@ -111,7 +111,6 @@ int __clk_enable(struct clk *clk)
111 111
112 return 0; 112 return 0;
113} 113}
114EXPORT_SYMBOL_GPL(__clk_enable);
115 114
116int clk_enable(struct clk *clk) 115int clk_enable(struct clk *clk)
117{ 116{
@@ -131,7 +130,7 @@ static void clk_kref_release(struct kref *kref)
131 /* Nothing to do */ 130 /* Nothing to do */
132} 131}
133 132
134void __clk_disable(struct clk *clk) 133static void __clk_disable(struct clk *clk)
135{ 134{
136 int count = kref_put(&clk->kref, clk_kref_release); 135 int count = kref_put(&clk->kref, clk_kref_release);
137 136
@@ -143,7 +142,6 @@ void __clk_disable(struct clk *clk)
143 clk->ops->disable(clk); 142 clk->ops->disable(clk);
144 } 143 }
145} 144}
146EXPORT_SYMBOL_GPL(__clk_disable);
147 145
148void clk_disable(struct clk *clk) 146void clk_disable(struct clk *clk)
149{ 147{
@@ -310,15 +308,11 @@ static int show_clocks(char *buf, char **start, off_t off,
310 list_for_each_entry_reverse(clk, &clock_list, node) { 308 list_for_each_entry_reverse(clk, &clock_list, node) {
311 unsigned long rate = clk_get_rate(clk); 309 unsigned long rate = clk_get_rate(clk);
312 310
313 /* 311 p += sprintf(p, "%-12s\t: %ld.%02ldMHz\t%s\n", clk->name,
314 * Don't bother listing dummy clocks with no ancestry 312 rate / 1000000, (rate % 1000000) / 10000,
315 * that only support enable and disable ops. 313 ((clk->flags & CLK_ALWAYS_ENABLED) ||
316 */ 314 (atomic_read(&clk->kref.refcount) != 1)) ?
317 if (unlikely(!rate && !clk->parent)) 315 "enabled" : "disabled");
318 continue;
319
320 p += sprintf(p, "%-12s\t: %ld.%02ldMHz\n", clk->name,
321 rate / 1000000, (rate % 1000000) / 10000);
322 } 316 }
323 317
324 return p - buf; 318 return p - buf;