[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <50F6F513.1030806@wwwdotorg.org>
Date: Wed, 16 Jan 2013 11:44:35 -0700
From: Stephen Warren <swarren@...dotorg.org>
To: Hiroshi Doyu <hdoyu@...dia.com>
CC: Prashant Gaikwad <pgaikwad@...dia.com>,
"mturquette@...aro.org" <mturquette@...aro.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 2/9] clk: tegra: Add tegra specific clocks
On 01/16/2013 05:31 AM, Hiroshi Doyu wrote:
> Prashant Gaikwad <pgaikwad@...dia.com> wrote @ Fri, 11 Jan 2013 08:46:20 +0100:
> ...
>> +struct clk *tegra_clk_periph(const char *name, const char **parent_names,
>> + int num_parents, struct tegra_clk_periph *periph,
>> + void __iomem *clk_base, u32 offset)
...
>> +struct clk *tegra_clk_periph_nodiv(const char *name, const char **parent_names,
>> + int num_parents, struct tegra_clk_periph *periph,
>> + void __iomem *clk_base, u32 offset)
...
>
> The above two functions are almost duplicate, can we take the common part from them?
Sure, that looks reasonable.
> struct clk *__tegra_clk_periph(const char *name, const char **parent_names,
> int num_parents, struct tegra_clk_periph *periph,
> void __iomem *clk_base, u32 offset, int div)
> periph->divider.reg = clk_base + offset;
That will also need to be conditional.
> periph->divider.hw.clk = div ? NULL : clk;
And that test is inverted.
> static inline struct clk *tegra_clk_periph(const char *name, const char **parent_names,
> int num_parents, struct tegra_clk_periph *periph,
> void __iomem *clk_base, u32 offset)
I'd rather just make these regular functions in the .c file; otherwise
they have to go into the header file, which means prototyping
__tegra_clk_periph() there and it just gets messy.
--
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