From: Stefan Wahren Date: Wed, 29 Apr 2015 16:36:43 +0000 (+0000) Subject: clk: Fix JSON output in debugfs X-Git-Tag: v4.14-rc1~5054^2~30^2~89 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7cb81136d2efe0f5ed9d965857f4756a15e6c338;p=platform%2Fkernel%2Flinux-rpi.git clk: Fix JSON output in debugfs 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 [sboyd@codeaurora.org: Added comment in function] Signed-off-by: Stephen Boyd --- diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 43b7e72..ea7e869 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -1951,11 +1951,12 @@ static void clk_dump_one(struct seq_file *s, struct clk_core *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_core_get_rate(c)); - seq_printf(s, "\"accuracy\": %lu", clk_core_get_accuracy(c)); + seq_printf(s, "\"rate\": %lu,", clk_core_get_rate(c)); + seq_printf(s, "\"accuracy\": %lu,", clk_core_get_accuracy(c)); seq_printf(s, "\"phase\": %d", clk_core_get_phase(c)); }