diff options
author | Johan Hovold <johan@kernel.org> | 2017-05-16 10:26:14 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-05-17 05:52:44 -0400 |
commit | ef53b92ece675ed9778b50f4432e004683696d01 (patch) | |
tree | 760d8ef241051956ff3387754d3bc48324ce13f1 | |
parent | a7415477a20448bbb7d13765784c0b29249a176f (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>
-rw-r--r-- | drivers/usb/core/of.c | 3 |
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); | |||
53 | * | 53 | * |
54 | * Find the companion device from platform bus. | 54 | * Find the companion device from platform bus. |
55 | * | 55 | * |
56 | * Takes a reference to the returned struct device which needs to be dropped | ||
57 | * after use. | ||
58 | * | ||
56 | * Return: On success, a pointer to the companion device, %NULL on failure. | 59 | * Return: On success, a pointer to the companion device, %NULL on failure. |
57 | */ | 60 | */ |
58 | struct device *usb_of_get_companion_dev(struct device *dev) | 61 | struct device *usb_of_get_companion_dev(struct device *dev) |