On 03/03, Joachim Eastwood wrote: > On 3 March 2016 at 00:01, Michael Turquette <mturquette@xxxxxxxxxxxx> wrote: > > > > 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 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html