Эх сурвалжийг харах

USB: core: of: document reference taken by companion helper

Document that the new companion-device lookup helper takes a reference
to the companion device which needs to be dropped after use.

Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Johan Hovold 8 жил өмнө
parent
commit
ef53b92ece
1 өөрчлөгдсөн 3 нэмэгдсэн , 0 устгасан
  1. 3 0
      drivers/usb/core/of.c

+ 3 - 0
drivers/usb/core/of.c

@@ -53,6 +53,9 @@ EXPORT_SYMBOL_GPL(usb_of_get_child_node);
  *
  * Find the companion device from platform bus.
  *
+ * Takes a reference to the returned struct device which needs to be dropped
+ * after use.
+ *
  * Return: On success, a pointer to the companion device, %NULL on failure.
  */
 struct device *usb_of_get_companion_dev(struct device *dev)