aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorTodd Poynor <toddpoynor@google.com>2012-06-17 11:57:50 -0600
committerPaul Walmsley <paul@pwsan.com>2012-06-17 11:57:50 -0600
commit6bc07d6afa1679a2f5b272bc36618314686e143a (patch)
tree05aac803f94ca8cdbef98d5a56d42c3d805717c8 /arch
parent485802a6c524e62b5924849dd727ddbb1497cc71 (diff)
ARM: OMAP: PM: Lock clocks list while generating summary
Commit a53025724052b2b1edbc982a4a248784638f563d (OMAP: Add debugfs node to show the summary of all clocks) introduced clock summary, however, we are interested in seeing snapshot of the clock state, not in dynamically changing clock configurations as the data provided by clock summary will then be useless for debugging configuration issues. So, hold the common lock when dumping the clock summary. Cc: Paul Walmsley <paul@pwsan.com> Cc: Tony Lindgren <tony@atomide.com> Signed-off-by: Todd Poynor <toddpoynor@google.com> [nm@ti.com: added commit message] Signed-off-by: Nishanth Menon <nm@ti.com> [paul@pwsan.com: minor edits to commit message] Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/plat-omap/clock.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index 62ec5c45279..706b7e29397 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -461,6 +461,7 @@ static int clk_dbg_show_summary(struct seq_file *s, void *unused)
struct clk *c;
struct clk *pa;
+ mutex_lock(&clocks_mutex);
seq_printf(s, "%-30s %-30s %-10s %s\n",
"clock-name", "parent-name", "rate", "use-count");
@@ -469,6 +470,7 @@ static int clk_dbg_show_summary(struct seq_file *s, void *unused)
seq_printf(s, "%-30s %-30s %-10lu %d\n",
c->name, pa ? pa->name : "none", c->rate, c->usecount);
}
+ mutex_unlock(&clocks_mutex);
return 0;
}