From patchwork Tue May 30 16:25:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 9754905 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 1A665602B9 for ; Tue, 30 May 2017 16:30:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0D71827F07 for ; Tue, 30 May 2017 16:30:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 026A028405; Tue, 30 May 2017 16:30:52 +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.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 A920A27F07 for ; Tue, 30 May 2017 16:30:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751155AbdE3Q0v (ORCPT ); Tue, 30 May 2017 12:26:51 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:36754 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751090AbdE3Q0t (ORCPT ); Tue, 30 May 2017 12:26:49 -0400 Received: by mail-lf0-f68.google.com with SMTP id h4so9318409lfj.3; Tue, 30 May 2017 09:26:48 -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=C3NW1AqCF1frjfd70/5G0ouZmaqoI8O4JUGzatL6V1A=; b=f4mi7vGWUP1a+sZVKWWdfL+6zuF8AVFJglmTx08mSOWz7bnRNpc1vfEv3kS5xbibcQ Dem4sm1cHZ0LnKOiOy9QHtkrc1H3LPDVJnEnwh89fQTIsNjCl7aKyp69zuL9XaEpQd8b Ngnw+ydFk03Sx1VnJH21WmMORTXHHGyVElym6uvkbbWSaDeXVOHSUPtwblaIkWTStItT ShZrO6aShxtbSCnEmpT9h4gU00aKEeR3obtFIoK5/X0n0SfPY7NN+XhAgCsh65HP3W2I +Idp0IYBc0tlWjgvxTFnmM7STZhQtBYnPNQqMkLRJqvVIZIroAwlBfagjnWQ0SzZ9Ork WGpw== 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=C3NW1AqCF1frjfd70/5G0ouZmaqoI8O4JUGzatL6V1A=; b=f+5mcM+xY/ko3Jipc9xTgu3TVncvinxdZWDxuTOvGohvtF2OFUE1uEgD72vaiWkYlR ALDJVKOtTBW17c9GMS+6tm/UCk3KnMGp5ArI1iPHrO1a1tldOpFBtsMbxUGJ3I9cLuRB NBkqaOlzMljLA/CMchx5rcEqKKO3iae80c0C6wVwXQFEshX4JcLZbbwj8uHTHyuUPTsS 3rTlmqis8Z0hkruGHsXwc7uH2ZLYP8ElnrYZyN8TUxuK0hZfcDc4V21JzClqvgllALl/ +6IomncmT4yN4sb0ztuXXCPyHsziil27k3jjlR9WKjjTsZok59Z1z5k6/wtN2q6cdJm1 jDXg== X-Gm-Message-State: AODbwcBqIJroud4C0ByxBgyTAxa5HOy9xBvDRgjNk+hrZAVwFKwK3cNG v4iqWLG9wb4osQ== X-Received: by 10.25.72.15 with SMTP id v15mr5340723lfa.18.1496161607562; Tue, 30 May 2017 09:26: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 r38sm2897684lfi.4.2017.05.30.09.26.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 May 2017 09:26:46 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.89) (envelope-from ) id 1dFjyr-0006ot-5b; Tue, 30 May 2017 18:26:49 +0200 From: Johan Hovold To: Greg Kroah-Hartman Cc: Linus Walleij , Peter Chen , Rob Herring , Arnd Bergmann , Sricharan R , Zhang Rui , Eduardo Valentin , linux-pm@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 2/7] USB: of: document reference taken by child-lookup helper Date: Tue, 30 May 2017 18:25:49 +0200 Message-Id: <20170530162554.26159-3-johan@kernel.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170530162554.26159-1-johan@kernel.org> References: <20170530162554.26159-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, 3 insertions(+) diff --git a/drivers/usb/core/of.c b/drivers/usb/core/of.c index d563cbcf76cf..17a4af02cf5b 100644 --- a/drivers/usb/core/of.c +++ b/drivers/usb/core/of.c @@ -28,6 +28,9 @@ * * Find the node from device tree according to its port number. * + * Takes a reference to the returned device-tree node, which needs to be + * dropped after use. + * * Return: On success, a pointer to the device node, %NULL on failure. */ struct device_node *usb_of_get_child_node(struct device_node *parent,