lkml.org 
[lkml]   [2011]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/7] ARM: tegra: timer: Enable timer and rtc clocks
On Mon, Feb 21, 2011 at 06:39:50PM -0800, Colin Cross wrote:
> + struct clk *clk;
> unsigned long rate = clk_measure_input_freq();
> int ret;
>
> + clk = clk_get_sys("timer", NULL);
> + BUG_ON(IS_ERR(clk));
> + clk_enable(clk);
> + clk_put(clk);
> +
> + clk = clk_get_sys("rtc-tegra", NULL);
> + BUG_ON(IS_ERR(clk));
> + clk_enable(clk);
> + clk_put(clk);

It's probably better to leave them get'd if you're continuing to use
them and just forget the reference.


\
 
 \ /
  Last update: 2011-02-22 21:59    [from the cache]
©2003-2011 Jasper Spaans