[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111023125555.GD1401@S2100-06.ap.freescale.net>
Date: Sun, 23 Oct 2011 20:55:56 +0800
From: Shawn Guo <shawn.guo@...escale.com>
To: Mike Turquette <mturquette@...com>
CC: <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<jeremy.kerr@...onical.com>, <broonie@...nsource.wolfsonmicro.com>,
<tglx@...utronix.de>, <linus.walleij@...ricsson.com>,
<amit.kucheria@...aro.org>, <dsaxena@...aro.org>,
<patches@...aro.org>, <linaro-dev@...ts.linaro.org>,
<paul@...an.com>, <grant.likely@...retlab.ca>, <sboyd@...inc.com>,
<skannan@...cinc.com>, <magnus.damm@...il.com>,
<arnd.bergmann@...aro.org>, <linux@....linux.org.uk>,
<eric.miao@...aro.org>, <richard.zhao@...aro.org>
Subject: Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure
Hi Mike,
Some random comments/nits ...
On Thu, Sep 22, 2011 at 03:26:56PM -0700, Mike Turquette wrote:
> +struct clk *clk_register(const struct clk_hw_ops *ops, struct clk_hw *hw,
> + const char *name)
> +{
> + struct clk *clk;
> +
> + clk = kzalloc(sizeof(*clk), GFP_KERNEL);
> + if (!clk)
> + return NULL;
> +
> + INIT_HLIST_HEAD(&clk->children);
> + INIT_HLIST_NODE(&clk->child_node);
> +
The children and child_node are introduced in patch #2, and should not
be used in patch #1.
> + clk->name = name;
> + clk->ops = ops;
> + clk->hw = hw;
> + hw->clk = clk;
> +
> + /* Query the hardware for parent and initial rate */
> +
> + if (clk->ops->get_parent)
> + /* We don't to lock against prepare/enable here, as
> + * the clock is not yet accessible from anywhere */
/*
* Multiple line comments
*/
> + clk->parent = clk->ops->get_parent(clk->hw);
> +
> + if (clk->ops->recalc_rate)
> + clk->rate = clk->ops->recalc_rate(clk->hw);
> +
> +
One blank line is good enough.
> + return clk;
> +}
--
Regards,
Shawn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists