Revert "dm: Export device_remove_children / device_unbind_children"
authorSimon Glass <sjg@chromium.org>
Mon, 9 Nov 2015 06:47:58 +0000 (23:47 -0700)
committerSimon Glass <sjg@chromium.org>
Fri, 20 Nov 2015 03:27:51 +0000 (20:27 -0700)
This reverts commit bb52b367f6ca4a3a918e77737f4ff6a1089912d9.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/core/device-remove.c
include/dm/device-internal.h

index bd6d4062c93723e2d4a5ff434c6d077af637ce81..e1714b2202b64145291eabd024206e261d57e0f3 100644 (file)
 #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;
 
index 322d35a4789c2f81a1401d066af09f3a47b22983..9388870d0c2a973b58e6447e167af9c3b0046690 100644 (file)
@@ -107,32 +107,6 @@ int device_unbind(struct udevice *dev);
 static inline int device_unbind(struct udevice *dev) { return 0; }
 #endif
 
-/**
- * device_remove_children() - Stop all device's children
- * @dev:       The device whose children are to be removed
- * @return 0 on success, -ve on error
- */
-#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)
-int device_remove_children(struct udevice *dev);
-#else
-static inline int device_remove_children(struct udevice *dev) { return 0; }
-#endif
-
-/**
- * device_unbind_children() - 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
- */
-#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)
-int device_unbind_children(struct udevice *dev);
-#else
-static inline int device_unbind_children(struct udevice *dev) { return 0; }
-#endif
-
 #if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)
 void device_free(struct udevice *dev);
 #else