lkml.org 
[lkml]   [2014]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH V2 6/6] cpufreq: Loongson1: Add cpufreq driver for Loongson1B
From
On 17 October 2014 13:47, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> On 17 October 2014 12:07, Kelvin Cheung <keguang.zhang@gmail.com> wrote:
>> V2:
>> Use devm_clk_get() instead of clk_get().
>
> Search for a few drivers which have used this API and understand how
> to use it.

To elaborate it a bit further, devm_* routines are there to make our
lives simple.
And they do it by allowing us to skip error handling.

So in your case because you are doing devm_clk_get(), you don't have to put
the clk on errors or in remove() routine. The device core will do that for you
once the device/driver bond finishes.

Also, what about clk_enable/prepare for these clks? You don't need them ?

--
viresh


\
 
 \ /
  Last update: 2014-10-17 12:21    [W:0.036 / U:2.864 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site