summaryrefslogtreecommitdiff
path: root/drivers/core
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-11-08 23:47:58 -0700
committerSimon Glass <sjg@chromium.org>2015-11-19 20:27:51 -0700
commit79725ca4f6d583e4c677f694b89c839ed7b07b8f (patch)
tree576fd3db9205422aa9c01b4514371d5426a6ef2a /drivers/core
parentba94e839119d15a3285a0c33ae24f401e997772d (diff)
downloadu-boot-imx-79725ca4f6d583e4c677f694b89c839ed7b07b8f.zip
u-boot-imx-79725ca4f6d583e4c677f694b89c839ed7b07b8f.tar.gz
u-boot-imx-79725ca4f6d583e4c677f694b89c839ed7b07b8f.tar.bz2
Revert "dm: Export device_remove_children / device_unbind_children"
This reverts commit bb52b367f6ca4a3a918e77737f4ff6a1089912d9. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/core')
-rw-r--r--drivers/core/device-remove.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/drivers/core/device-remove.c b/drivers/core/device-remove.c
index bd6d406..e1714b2 100644
--- a/drivers/core/device-remove.c
+++ b/drivers/core/device-remove.c
@@ -18,7 +18,16 @@
#include <dm/uclass-internal.h>
#include <dm/util.h>
-int device_unbind_children(struct udevice *dev)
+/**
+ * device_chld_unbind() - Unbind all device's children from the device
+ *
+ * On error, the function continues to unbind all children, and reports the
+ * first error.
+ *
+ * @dev: The device that is to be stripped of its children
+ * @return 0 on success, -ve on error
+ */
+static int device_chld_unbind(struct udevice *dev)
{
struct udevice *pos, *n;
int ret, saved_ret = 0;
@@ -34,7 +43,12 @@ int device_unbind_children(struct udevice *dev)
return saved_ret;
}
-int device_remove_children(struct udevice *dev)
+/**
+ * device_chld_remove() - Stop all device's children
+ * @dev: The device whose children are to be removed
+ * @return 0 on success, -ve on error
+ */
+static int device_chld_remove(struct udevice *dev)
{
struct udevice *pos, *n;
int ret;
@@ -73,7 +87,7 @@ int device_unbind(struct udevice *dev)
return ret;
}
- ret = device_unbind_children(dev);
+ ret = device_chld_unbind(dev);
if (ret)
return ret;
@@ -153,7 +167,7 @@ int device_remove(struct udevice *dev)
if (ret)
return ret;
- ret = device_remove_children(dev);
+ ret = device_chld_remove(dev);
if (ret)
goto err;