]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
clk: imx8mm: fix clk set parent
authorPeng Fan <peng.fan@nxp.com>
Sat, 27 Jun 2020 07:48:04 +0000 (15:48 +0800)
committerPeng Fan <peng.fan@nxp.com>
Tue, 14 Jul 2020 07:23:47 +0000 (15:23 +0800)
Fix clk set parent, so we could still have correct clocks after
parent changing.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/clk/imx/clk-imx8mm.c

index 66c9601b0c13b72349906c6156a2d825ec3c77dd..d609fad7acf338a46256247192863cf7c6938c44 100644 (file)
@@ -191,7 +191,10 @@ static int imx8mm_clk_set_parent(struct clk *clk, struct clk *parent)
        if (ret)
                return ret;
 
-       return clk_set_parent(c, cp);
+       ret = clk_set_parent(c, cp);
+       c->dev->parent = cp->dev;
+
+       return ret;
 }
 
 static struct clk_ops imx8mm_clk_ops = {