[3.19.y-ckt stable] Patch "clk: Fix JSON output in debugfs" has been added to staging queue
Kamal Mostafa
kamal at canonical.com
Thu Jul 16 01:07:42 UTC 2015
This is a note to let you know that I have just added a patch titled
clk: Fix JSON output in debugfs
to the linux-3.19.y-queue branch of the 3.19.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.19.y-queue
This patch is scheduled to be released in version 3.19.y-ckt4.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.19.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
------
>From 50e3ec3d35491e750305e6ab6992fed712d511eb Mon Sep 17 00:00:00 2001
From: Stefan Wahren <stefan.wahren at i2se.com>
Date: Wed, 29 Apr 2015 16:36:43 +0000
Subject: 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 at i2se.com>
[sboyd at codeaurora.org: Added comment in function]
Signed-off-by: Stephen Boyd <sboyd at codeaurora.org>
[ kamal: backport to 3.19-stable: context ]
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
drivers/clk/clk.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 2f14f57..9a50629 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -177,11 +177,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));
seq_printf(s, "\"phase\": %d", clk_get_phase(c));
}
--
1.9.1
More information about the kernel-team
mailing list