clk: initialize clk->data when using default xlate
authorSekhar Nori <nsekhar@ti.com>
Thu, 11 Jul 2019 09:00:24 +0000 (14:30 +0530)
committerSimon Glass <sjg@chromium.org>
Wed, 24 Jul 2019 19:54:08 +0000 (12:54 -0700)
commite497fabb9186bb2f36b4f3ceda4c69bea8e22233
treeb3c3ad3e6da94ba530fbcd6ee38edab4b43b0455
parentc026231e15fa634c6865c2f8d2317d973b4cc4b4
clk: initialize clk->data when using default xlate

Right now when using clk_of_xlate_default(), clk->data
remains un-initialized because clk_get_bulk() does not
initialize memory on allocation of clock structure.

This can cause problems when data is used to match if
two clocks pointers are exactly the same underlying
clocks, for example.

Fix it by initializing clk->data to 0.

Suggested-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
drivers/clk/clk-uclass.c