Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1658900

[PATCH v2 2/7] USB: of: document reference taken by child-lookup helper

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Johan Hovold <johan@kernel.org>
Newsgroups linux.kernel
Subject [PATCH v2 2/7] USB: of: document reference taken by child-lookup helper
Date Tue, 06 Jun 2017 18:10:02 +0200
Message-ID <tPpdo-2Df-37@gated-at.bofh.it> (permalink)
References <tPpdn-2Df-5@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=y96xDnx+vpkmZ+kE+CtmUd3Jb/mKm5G1Iz64E/QgyNA=; b=vHN1X0hAeFawXGWjOy7cqADAX1lnyWa2NcOtyeEbYUa0JnrUb4ikEyyXoZQOGBMRgh wfsnXsFoERrXuYla0rFT+P+cZKhQeI+vxFZXsnMkkIhHM8obKbPUNLhz0XN0YFspiHTD QVZ1WcCM4VXPYG1lUoxKGWVDBrLs73Aw+G0jiYDEOkpRdz0ZFAgDT4bH52Agbg8ZtKse drK22ndibZTbgPYa26I4m/RBy2kCGJSR6yd9ZDeRQoiFblGmC9ES8LFWY5VEf/0GvV2S SjgkNHItxXX/CrsLFizXFLt5+4jcRvtqZs+SuuXLBb3n/Heb/ne0cHVk83CoDcTBGTQn FEQQ==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=y96xDnx+vpkmZ+kE+CtmUd3Jb/mKm5G1Iz64E/QgyNA=; b=nEKmlWa2lglPUoibyw2W3e9XXf0b2DTyxEFNqt2BmFBoXcyTjuGZn3i3glT2foeYUk m+35ACzRmFhObkJeeTSbRZ1rhNS5sr5YF6q2NESGA73t8scklx2P90uUFmFjZLSIyjPf vkyoOfeE9Y4Ww+sMzfDXI7B98WTfyqnmXxGT4HDa9ZWF5JI4JtDrGktkhJqql3Drfy9i KYok0AWIBSQ8m0wMuEPQaYB2X8WWBagKPFgSqPwXZDgbcYfhM1PYqk3rABeOY8mjDIRL SRjkq4KTYdnwMqvdfFcWjF9qpA+W6qmIQSPB5I5mOqH65wo3+AVkwlZd2t7yZgZxzd68 ApKA==
X-Gm-Message-State AODbwcAXla6ekOA7z2G4/fzMllZS3TWqgkU9RoMCeBam414Bt+0RGWa3 isMzv4SaV0ZbkGnE4Hk=
X-Received by 10.25.219.76 with SMTP id s73mr2610566lfg.53.1496764847047; Tue, 06 Jun 2017 09:00:47 -0700 (PDT)
X-Mailer git-send-email 2.13.0
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 24
Organization linux.* mail to news gateway
X-Original-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>
X-Original-Date Tue, 6 Jun 2017 17:58:59 +0200
X-Original-Message-ID <20170606155904.26819-3-johan@kernel.org>
X-Original-References <20170606155904.26819-1-johan@kernel.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1658900

Show key headers only | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/7] driver core/USB/thermal: fix device-tree node reuse Johan Hovold <johan@kernel.org> - 2017-06-06 18:10 +0200
  [PATCH v2 1/7] USB: core: fix device node leak Johan Hovold <johan@kernel.org> - 2017-06-06 18:10 +0200
  [PATCH v2 3/7] driver core: add helper to reuse a device-tree node Johan Hovold <johan@kernel.org> - 2017-06-06 18:10 +0200
  [PATCH v2 2/7] USB: of: document reference taken by child-lookup helper Johan Hovold <johan@kernel.org> - 2017-06-06 18:10 +0200
  [PATCH v2 6/7] thermal: max77620: fix device-node reference imbalance Johan Hovold <johan@kernel.org> - 2017-06-06 18:10 +0200

csiph-web