Commit 79725ca4f6d583e4c677f694b89c839ed7b07b8f

Authored by Simon Glass
1 parent ba94e83911

Revert "dm: Export device_remove_children / device_unbind_children"

This reverts commit bb52b367f6ca4a3a918e77737f4ff6a1089912d9.

Signed-off-by: Simon Glass <sjg@chromium.org>

Showing 2 changed files with 18 additions and 30 deletions Side-by-side Diff

drivers/core/device-remove.c
... ... @@ -18,7 +18,16 @@
18 18 #include <dm/uclass-internal.h>
19 19 #include <dm/util.h>
20 20  
21   -int device_unbind_children(struct udevice *dev)
  21 +/**
  22 + * device_chld_unbind() - Unbind all device's children from the device
  23 + *
  24 + * On error, the function continues to unbind all children, and reports the
  25 + * first error.
  26 + *
  27 + * @dev: The device that is to be stripped of its children
  28 + * @return 0 on success, -ve on error
  29 + */
  30 +static int device_chld_unbind(struct udevice *dev)
22 31 {
23 32 struct udevice *pos, *n;
24 33 int ret, saved_ret = 0;
... ... @@ -34,7 +43,12 @@
34 43 return saved_ret;
35 44 }
36 45  
37   -int device_remove_children(struct udevice *dev)
  46 +/**
  47 + * device_chld_remove() - Stop all device's children
  48 + * @dev: The device whose children are to be removed
  49 + * @return 0 on success, -ve on error
  50 + */
  51 +static int device_chld_remove(struct udevice *dev)
38 52 {
39 53 struct udevice *pos, *n;
40 54 int ret;
... ... @@ -73,7 +87,7 @@
73 87 return ret;
74 88 }
75 89  
76   - ret = device_unbind_children(dev);
  90 + ret = device_chld_unbind(dev);
77 91 if (ret)
78 92 return ret;
79 93  
... ... @@ -153,7 +167,7 @@
153 167 if (ret)
154 168 return ret;
155 169  
156   - ret = device_remove_children(dev);
  170 + ret = device_chld_remove(dev);
157 171 if (ret)
158 172 goto err;
159 173  
include/dm/device-internal.h
... ... @@ -107,32 +107,6 @@
107 107 static inline int device_unbind(struct udevice *dev) { return 0; }
108 108 #endif
109 109  
110   -/**
111   - * device_remove_children() - Stop all device's children
112   - * @dev: The device whose children are to be removed
113   - * @return 0 on success, -ve on error
114   - */
115   -#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)
116   -int device_remove_children(struct udevice *dev);
117   -#else
118   -static inline int device_remove_children(struct udevice *dev) { return 0; }
119   -#endif
120   -
121   -/**
122   - * device_unbind_children() - Unbind all device's children from the device
123   - *
124   - * On error, the function continues to unbind all children, and reports the
125   - * first error.
126   - *
127   - * @dev: The device that is to be stripped of its children
128   - * @return 0 on success, -ve on error
129   - */
130   -#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)
131   -int device_unbind_children(struct udevice *dev);
132   -#else
133   -static inline int device_unbind_children(struct udevice *dev) { return 0; }
134   -#endif
135   -
136 110 #if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)
137 111 void device_free(struct udevice *dev);
138 112 #else