summaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk.c
diff options
context:
space:
mode:
authorStefan Wahren <stefan.wahren@i2se.com>2015-04-29 16:36:43 +0000
committerLuis Henriques <luis.henriques@canonical.com>2015-07-15 10:01:14 +0100
commit87b5570e79a2d8f4ea5ba3f0d94eb2dce623173d (patch)
treee7be5df491ef733bbd650170830622f669764430 /drivers/clk/clk.c
parentcf1a6d57503d7286e7a843071ae458855e8f246a (diff)
downloadlinux-stable-87b5570e79a2d8f4ea5ba3f0d94eb2dce623173d.tar.gz
linux-stable-87b5570e79a2d8f4ea5ba3f0d94eb2dce623173d.tar.bz2
linux-stable-87b5570e79a2d8f4ea5ba3f0d94eb2dce623173d.zip
clk: Fix JSON output in debugfs
commit 7cb81136d2efe0f5ed9d965857f4756a15e6c338 upstream. key/value pairs in a JSON object must be separated by a comma. After adding the properties "accuracy" and "phase" the JSON output of /sys/kernel/debug/clk/clk_dump is invalid. So add the missing commas to fix it. Fixes: 5279fc402ae5 ("clk: add clk accuracy retrieval support") Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> [sboyd@codeaurora.org: Added comment in function] Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> [ luis: backported to 3.16: adjusted context ] Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'drivers/clk/clk.c')
-rw-r--r--drivers/clk/clk.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 1dee8d2086fb..604f79f867d1 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -165,11 +165,12 @@ static void clk_dump_one(struct seq_file *s, struct clk *c, int level)
if (!c)
return;
+ /* This should be JSON format, i.e. elements separated with a comma */
seq_printf(s, "\"%s\": { ", c->name);
seq_printf(s, "\"enable_count\": %d,", c->enable_count);
seq_printf(s, "\"prepare_count\": %d,", c->prepare_count);
- seq_printf(s, "\"rate\": %lu", clk_get_rate(c));
- seq_printf(s, "\"accuracy\": %lu", clk_get_accuracy(c));
+ seq_printf(s, "\"rate\": %lu,", clk_get_rate(c));
+ seq_printf(s, "\"accuracy\": %lu,", clk_get_accuracy(c));
}
static void clk_dump_subtree(struct seq_file *s, struct clk *c, int level)