On 3 March 2016 at 00:01, Michael Turquette <mturquette@xxxxxxxxxxxx> wrote: > Hi Joachim, > > Quoting Joachim Eastwood (2016-02-24 14:04:19) >> +static struct clk *clk_register_creg_clk(struct clk_creg_data *creg_clk, >> + const char **parent_name, >> + struct regmap *syscon) >> +{ >> + struct clk_init_data init; >> + >> + init.ops = creg_clk->ops; >> + init.name = creg_clk->name; >> + init.parent_names = parent_name; >> + init.num_parents = 1; >> + >> + creg_clk->reg = syscon; >> + creg_clk->hw.init = &init; >> + >> + return clk_register(NULL, &creg_clk->hw); > > 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? regards, Joachim Eastwood -- 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