aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sh/kernel/cpu/clock.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/arch/sh/kernel/cpu/clock.c b/arch/sh/kernel/cpu/clock.c
index 73334c689e9d..f5eb56e6bc59 100644
--- a/arch/sh/kernel/cpu/clock.c
+++ b/arch/sh/kernel/cpu/clock.c
@@ -308,15 +308,11 @@ static int show_clocks(char *buf, char **start, off_t off,
308 list_for_each_entry_reverse(clk, &clock_list, node) { 308 list_for_each_entry_reverse(clk, &clock_list, node) {
309 unsigned long rate = clk_get_rate(clk); 309 unsigned long rate = clk_get_rate(clk);
310 310
311 /* 311 p += sprintf(p, "%-12s\t: %ld.%02ldMHz\t%s\n", clk->name,
312 * Don't bother listing dummy clocks with no ancestry 312 rate / 1000000, (rate % 1000000) / 10000,
313 * that only support enable and disable ops. 313 ((clk->flags & CLK_ALWAYS_ENABLED) ||
314 */ 314 (atomic_read(&clk->kref.refcount) != 1)) ?
315 if (unlikely(!rate && !clk->parent)) 315 "enabled" : "disabled");
316 continue;
317
318 p += sprintf(p, "%-12s\t: %ld.%02ldMHz\n", clk->name,
319 rate / 1000000, (rate % 1000000) / 10000);
320 } 316 }
321 317
322 return p - buf; 318 return p - buf;