]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
dm: Add a return value comment to device_get_child()
authorSimon Glass <sjg@chromium.org>
Mon, 27 Jul 2015 21:47:19 +0000 (15:47 -0600)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 06:00:53 +0000 (08:00 +0200)
At present this function does not specify its return value. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
include/dm/device.h

index 9fa0048bd0a4448b481071d5aae8b14c7d063898..12fd02d09a7f3abce5d36638e14167ae1445b878 100644 (file)
@@ -318,6 +318,8 @@ const char *dev_get_uclass_name(struct udevice *dev);
  * @dev:       Parent device to check
  * @index:     Child index
  * @devp:      Returns pointer to device
+ * @return 0 if OK, -ENODEV if no such device, other error if the device fails
+ *        to probe
  */
 int device_get_child(struct udevice *parent, int index, struct udevice **devp);
 
@@ -413,7 +415,7 @@ int device_get_global_by_of_offset(int of_offset, struct udevice **devp);
 int device_find_first_child(struct udevice *parent, struct udevice **devp);
 
 /**
- * device_find_first_child() - Find the first child of a device
+ * device_find_next_child() - Find the next child of a device
  *
  * @devp: Pointer to previous child device on entry. Returns pointer to next
  *             child device, or NULL if none