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: v4.14-rc1~869^2~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ef53b92ece675ed9778b50f4432e004683696d01;p=platform%2Fkernel%2Flinux-rpi3.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 d787f19..d563cbc 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)