lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAKohpokYhpTU-SXYuLbGz4TxhhWvring_2PB-CVBWeGjdeeXKA@mail.gmail.com>
Date:	Fri, 17 Oct 2014 15:18:00 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	Kelvin Cheung <keguang.zhang@...il.com>
Cc:	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	"Rafael J. Wysocki" <rjw@...ysocki.net>, linux-mips@...ux-mips.org,
	Ralf Baechle <ralf@...ux-mips.org>
Subject: Re: [PATCH V2 6/6] cpufreq: Loongson1: Add cpufreq driver for Loongson1B

On 17 October 2014 13:47, Viresh Kumar <viresh.kumar@...aro.org> wrote:
> On 17 October 2014 12:07, Kelvin Cheung <keguang.zhang@...il.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
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ