Thread (7 messages) 7 messages, 4 authors, 2016-03-03

Re: [PATCH v4 1/2] clk: add lpc18xx creg clk driver

From: Stephen Boyd <hidden>
Date: 2016-03-03 20:13:45
Also in: linux-clk

On 03/03, Joachim Eastwood wrote:
On 3 March 2016 at 00:01, Michael Turquette [off-list ref] wrote:
quoted
This should be devm_clk_register with your struct device *dev passed
into it.
Since clk_register_creg_clk() is used both from early init and probe
I'll need to change the function a bit.

I'll pass dev in as a parameter and either do clk_register() or
devm_clk_register() depending on dev being NULL or not.
Doesn't look like devm_clk_register() would like to be passed NULL for dev.


I send out a new version tomorrow.

btw, this driver is a builtin_platform_driver. So is there a point in
using devm_clk_register?
Builtin drivers can still probe defer or fail for other reasons,
so just in case that happens it's better to use
devm_clk_register() to make sure we cleanup on the error path. It
may never actually happen in practice, but it's better to write
safe drivers.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help