From: Wenyou Yang Date: Tue, 27 Sep 2016 03:00:28 +0000 (+0800) Subject: clk: clk-uclass: Assign clk->dev before call .of_xlate X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=3f56b1321593c0081e77a3bc900177e6cf2f21d6;p=u-boot.git clk: clk-uclass: Assign clk->dev before call .of_xlate In order to make clk->dev available in ops->of_xlate() to get the clock ID from the 'reg' property of the clock node, assign the clk->dev before calling ops->of_xlate(). Signed-off-by: Wenyou Yang Acked-by: Stephen Warren Acked-by: Simon Glass --- diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c index c42fff6ec2..153ceba702 100644 --- a/drivers/clk/clk-uclass.c +++ b/drivers/clk/clk-uclass.c @@ -80,6 +80,9 @@ int clk_get_by_index(struct udevice *dev, int index, struct clk *clk) __func__, ret); return ret; } + + clk->dev = dev_clk; + ops = clk_dev_ops(dev_clk); if (ops->of_xlate)