From patchwork Tue Jun 6 15:58:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 9769217 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1006E6034B for ; Tue, 6 Jun 2017 16:02:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1A21122B1F for ; Tue, 6 Jun 2017 16:02:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0ED3728415; Tue, 6 Jun 2017 16:02:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF84B22B1F for ; Tue, 6 Jun 2017 16:02:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751562AbdFFQAz (ORCPT ); Tue, 6 Jun 2017 12:00:55 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:36692 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751390AbdFFQAt (ORCPT ); Tue, 6 Jun 2017 12:00:49 -0400 Received: by mail-lf0-f66.google.com with SMTP id x81so6707543lfb.3; Tue, 06 Jun 2017 09:00:47 -0700 (PDT) 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) Received: from xi.terra (c-42c8e255.07-184-6d6c6d4.cust.bredbandsbolaget.se. [85.226.200.66]) by smtp.gmail.com with ESMTPSA id k129sm7662198lfg.12.2017.06.06.09.00.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Jun 2017 09:00:45 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.89) (envelope-from ) id 1dIGuU-000714-Nf; Tue, 06 Jun 2017 18:00:46 +0200 From: Johan Hovold To: Greg Kroah-Hartman Cc: Linus Walleij , Peter Chen , Rob Herring , Arnd Bergmann , Sricharan R , Zhang Rui , Eduardo Valentin , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-usb@vger.kernel.org, Johan Hovold Subject: [PATCH v2 2/7] USB: of: document reference taken by child-lookup helper Date: Tue, 6 Jun 2017 17:58:59 +0200 Message-Id: <20170606155904.26819-3-johan@kernel.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170606155904.26819-1-johan@kernel.org> References: <20170606155904.26819-1-johan@kernel.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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)