Explorar o código

base/core.c: improve comment of the function device_find_child()

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Federico Vaga %!s(int64=12) %!d(string=hai) anos
pai
achega
a4e2400a63
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      drivers/base/core.c

+ 2 - 0
drivers/base/core.c

@@ -1372,6 +1372,8 @@ int device_for_each_child(struct device *parent, void *data,
  * if it does.  If the callback returns non-zero and a reference to the
  * current device can be obtained, this function will return to the caller
  * and not iterate over any more devices.
+ *
+ * NOTE: you will need to drop the reference with put_device() after use.
  */
 struct device *device_find_child(struct device *parent, void *data,
 				 int (*match)(struct device *dev, void *data))