lkml.org 
[lkml]   [2012]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/6 v2] arm: use devicetree to get smp_twd clock
On Fri, Nov 02, 2012 at 01:51:44PM -0500, Mark Langsdorf wrote:
> -static struct clk *twd_get_clock(void)
> +static struct clk *twd_get_clock(struct device_node *np)
> {
> - struct clk *clk;
> + struct clk *clk = NULL;
> int err;
>
> - clk = clk_get_sys("smp_twd", NULL);
> + if (np)
> + clk = of_clk_get(np, 0);
> + if (!clk)

What does a NULL return from of_clk_get() mean? Where is this defined?

> @@ -349,6 +348,10 @@ int __init twd_local_timer_register(struct twd_local_timer *tlt)
> if (!twd_base)
> return -ENOMEM;
>
> + twd_clk = twd_get_clock(NULL);
> +
> + twd_clk = twd_get_clock(NULL);
> +

Why twice?


\
 
 \ /
  Last update: 2012-11-04 11:21    [W:1.746 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site