Message ID | 227c01cd8aee$638ee0d0$2aaca270$%kim@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 09/05/2012 12:41 AM, Kukjin Kim wrote:
> Yeah, could be. BTW, following will fix it on Samsung platforms?
Yes, that might be better. I tried something similar but thought
it might not be worth to invest in a dead horse.. Anyway, since
converting all Samsung platforms is expected to take some time
(also all this out of tree code) probably better to apply this
fix now, before we have an alternative solution.
I noticed the most of clocks hove now reported wrong "rate" value
in this debugs-fs tree, due to not calling get_rate when needed.
It's not really important though (looks like it's by design).
--
Regards,
Sylwester
diff --git a/arch/arm/plat-samsung/clock.c b/arch/arm/plat-samsung/clock.c index 65c5eca..b7338ce 100644 --- a/arch/arm/plat-samsung/clock.c +++ b/arch/arm/plat-samsung/clock.c @@ -281,6 +281,15 @@ int s3c24xx_register_clock(struct clk *clk) if (clk->enable == NULL) clk->enable = clk_null_enable; + /* add to the list of available clocks */ + + /* Quick check to see if this clock has already been registered. */ + BUG_ON(clk->list.prev != clk->list.next); + + spin_lock(&clocks_lock); + list_add(&clk->list, &clocks); + spin_unlock(&clocks_lock); + /* fill up the clk_lookup structure and register it*/ clk->lookup.dev_id = clk->devname; clk->lookup.con_id = clk->name; @@ -395,7 +404,11 @@ static int clk_debugfs_register_one(struct clk *c) char s[255]; char *p = s; - p += sprintf(p, "%s", c->devname); + if (c->name) + p += sprintf(p, "%s", c->name); + + if (c->devname) + p += sprintf(p, ":%s", c->devname); d = debugfs_create_dir(s, pa ? pa->dent : clk_debugfs_root); if (!d)