Signed-off-by: Andrey Panov <rockford@xxxxxxxxx> --- drivers/clk/clk.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 584e2f3..5f78c9c 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -212,8 +212,17 @@ struct clk *clk_get_parent(struct clk *clk) int clk_register(struct clk *clk) { + struct clk *c; + clk->parents = xzalloc(sizeof(struct clk *) * clk->num_parents); + list_for_each_entry(c, &clks, list) { + if (!strcmp(c->name, clk->name)){ + pr_err("%s clk %s is already registered, skipping!\n", __func__, clk->name); + return 0; + } + } + list_add_tail(&clk->list, &clks); return 0; -- 2.1.4 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox