drivers: core: nullify gd->dm_root after dm_uninit()
authorJean-Jacques Hiblot <jjhiblot@ti.com>
Fri, 7 Dec 2018 13:50:54 +0000 (14:50 +0100)
committerHeiko Schocher <hs@denx.de>
Mon, 10 Dec 2018 06:23:45 +0000 (07:23 +0100)
commitc483f4cec07fcd732ea4c4dfa98b584ed9295b3d
tree07c6814b114c663948757c0a214f3ee89729b0d8
parent85e51be9fb838eec68590cba991f07345fc07488
drivers: core: nullify gd->dm_root after dm_uninit()

To reset the DM after a new dtb is loaded, we need to call dm_uninit()
and then dm_init(). This fails however because gd->dm_root is not nullified
by dm_uninit().
Fixing it by setting gd->dm_root in dm_uninit().

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
drivers/core/root.c