summaryrefslogtreecommitdiff
path: root/drivers/usb/core
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2017-05-16 16:26:14 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-17 11:52:44 +0200
commitef53b92ece675ed9778b50f4432e004683696d01 (patch)
tree760d8ef241051956ff3387754d3bc48324ce13f1 /drivers/usb/core
parenta7415477a20448bbb7d13765784c0b29249a176f (diff)
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>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r--drivers/usb/core/of.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/core/of.c b/drivers/usb/core/of.c
index d787f195a9a6..d563cbcf76cf 100644
--- a/drivers/usb/core/of.c
+++ b/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)