From: Johan Hovold Date: Tue, 16 May 2017 14:26:14 +0000 (+0200) Subject: USB: core: of: document reference taken by companion helper X-Git-Tag: MMI-PSA29.97-13-9~5558^2~18 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ef53b92ece675ed9778b50f4432e004683696d01;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- 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)