commit | 00197583a256b0297b045300ae1b80d590b7f7d1 | [log] [tgz] |
---|---|---|
author | Simon Glass <sjg@chromium.org> | Wed Jul 23 06:55:01 2014 -0600 |
committer | Simon Glass <sjg@chromium.org> | Wed Jul 23 14:07:24 2014 +0100 |
tree | 2c5eb3c92fb02ac1f364963becf4dd1321cd3d13 | |
parent | 6d3b3e20beb9bbc2ee0c083084859310c272e31a [diff] [blame] |
dm: Provide a way to shut down driver model Add a new method which removes and unbinds all drivers. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Marek Vasut <marex@denx.de>
diff --git a/drivers/core/root.c b/drivers/core/root.c index ac1c164..346d462 100644 --- a/drivers/core/root.c +++ b/drivers/core/root.c
@@ -56,6 +56,14 @@ return 0; } +int dm_uninit(void) +{ + device_remove(dm_root()); + device_unbind(dm_root()); + + return 0; +} + int dm_scan_platdata(void) { int ret;