[PATCH 3/4] ARM: smp_twd: get the rate from a clock

Shilimkar, Santosh santosh.shilimkar at ti.com
Tue Dec 13 03:46:13 EST 2011


On Tue, Dec 13, 2011 at 1:47 PM, Russell King - ARM Linux
<linux at arm.linux.org.uk> wrote:
> On Tue, Dec 13, 2011 at 10:54:14AM +0530, Santosh Shilimkar wrote:
>> > +static struct clk *twd_get_clock(void)
>> > +{
>> > +   struct clk *clk;
>> > +   int err;
>> > +
>> > +   clk = clk_get_sys("smp_twd", NULL);
>>
>> As noticed by Mike, would be better to use con_id instead
>> of dev_id here. I mean,
>> clk = clk_get_sys(NULL, "smp_twd");
>
> Why?  It makes more sense for a device ID to be passed for this.
Sorry. I assumed clk_get_sys() signature same as clk_get(). And then
thought dev pointer and con_id is the right way to go about it.
Since clk_get_sys() directly takes dev_id, it should be fine.

Will update OMAP clock-node patch accordingly.

Regards
Santosh



More information about the linux-arm-kernel mailing list