From: Johan Hovold <johan@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Peter Chen <peter.chen@nxp.com>, Rob Herring <robh@kernel.org>,
Arnd Bergmann <arnd@arndb.de>,
Sricharan R <sricharan@codeaurora.org>,
Zhang Rui <rui.zhang@intel.com>,
Eduardo Valentin <edubezval@gmail.com>,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
linux-usb@vger.kernel.org, Johan Hovold <johan@kernel.org>
Subject: [PATCH v2 2/7] USB: of: document reference taken by child-lookup helper
Date: Tue, 6 Jun 2017 17:58:59 +0200 [thread overview]
Message-ID: <20170606155904.26819-3-johan@kernel.org> (raw)
In-Reply-To: <20170606155904.26819-1-johan@kernel.org>
Document that the child-node lookup helper takes a reference to the
device-tree node which needs to be dropped after use.
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/usb/core/of.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/core/of.c b/drivers/usb/core/of.c
index d563cbcf76cf..3863bb1ce8c5 100644
--- a/drivers/usb/core/of.c
+++ b/drivers/usb/core/of.c
@@ -28,7 +28,8 @@
*
* Find the node from device tree according to its port number.
*
- * Return: On success, a pointer to the device node, %NULL on failure.
+ * Return: A pointer to the node with incremented refcount if found, or
+ * %NULL otherwise.
*/
struct device_node *usb_of_get_child_node(struct device_node *parent,
int portnum)
--
2.13.0
next prev parent reply other threads:[~2017-06-06 15:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-06 15:58 [PATCH v2 0/7] driver core/USB/thermal: fix device-tree node reuse Johan Hovold
2017-06-06 15:58 ` [PATCH v2 1/7] USB: core: fix device node leak Johan Hovold
2017-06-06 15:58 ` Johan Hovold [this message]
2017-06-06 15:59 ` [PATCH v2 3/7] driver core: add helper to reuse a device-tree node Johan Hovold
2017-06-06 15:59 ` [PATCH v2 4/7] driver core: fix automatic pinctrl management Johan Hovold
[not found] ` <20170606155904.26819-1-johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-06-06 15:59 ` [PATCH v2 5/7] USB: of: fix root-hub device-tree node handling Johan Hovold
2017-06-06 15:59 ` [PATCH v2 6/7] thermal: max77620: fix device-node reference imbalance Johan Hovold
2017-06-06 15:59 ` [PATCH v2 7/7] thermal: max77620: fix pinmux conflict on reprobe Johan Hovold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170606155904.26819-3-johan@kernel.org \
--to=johan@kernel.org \
--cc=arnd@arndb.de \
--cc=edubezval@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=peter.chen@nxp.com \
--cc=robh@kernel.org \
--cc=rui.zhang@intel.com \
--cc=sricharan@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).