diff options
author | Jean-Jacques Hiblot <jjhiblot@ti.com> | 2018-12-07 16:50:54 +0300 |
---|---|---|
committer | Heiko Schocher <hs@denx.de> | 2018-12-10 09:23:45 +0300 |
commit | c483f4cec07fcd732ea4c4dfa98b584ed9295b3d (patch) | |
tree | 07c6814b114c663948757c0a214f3ee89729b0d8 /drivers/core/root.c | |
parent | 85e51be9fb838eec68590cba991f07345fc07488 (diff) | |
download | u-boot-c483f4cec07fcd732ea4c4dfa98b584ed9295b3d.tar.xz |
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>
Diffstat (limited to 'drivers/core/root.c')
-rw-r--r-- | drivers/core/root.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/core/root.c b/drivers/core/root.c index 4ce55f9cc8..e6ec7faf37 100644 --- a/drivers/core/root.c +++ b/drivers/core/root.c @@ -187,6 +187,7 @@ int dm_uninit(void) { device_remove(dm_root(), DM_REMOVE_NORMAL); device_unbind(dm_root()); + gd->dm_root = NULL; return 0; } |