diff options
author | Simon Glass <sjg@chromium.org> | 2014-07-23 06:55:01 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2014-07-23 14:07:24 +0100 |
commit | 9adbd7a116d62349eb0a85b5a08ab3ff0a12d556 (patch) | |
tree | 2c5eb3c92fb02ac1f364963becf4dd1321cd3d13 /drivers/core | |
parent | 7497812d47d4ad17172ec373469a33a6ab8b257e (diff) |
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>
Diffstat (limited to 'drivers/core')
-rw-r--r-- | drivers/core/root.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/core/root.c b/drivers/core/root.c index ac1c1648f3..346d462470 100644 --- a/drivers/core/root.c +++ b/drivers/core/root.c @@ -56,6 +56,14 @@ int dm_init(void) return 0; } +int dm_uninit(void) +{ + device_remove(dm_root()); + device_unbind(dm_root()); + + return 0; +} + int dm_scan_platdata(void) { int ret; |