From patchwork Tue Sep 23 18:44:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 4959001 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C8AAE9F3DF for ; Tue, 23 Sep 2014 18:48:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8D72E2015A for ; Tue, 23 Sep 2014 18:48:06 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 694DD20259 for ; Tue, 23 Sep 2014 18:48:05 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XWV6T-0005gY-6B; Tue, 23 Sep 2014 18:46:21 +0000 Received: from mail-we0-x22e.google.com ([2a00:1450:400c:c03::22e]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XWV5T-0003bf-OF for linux-arm-kernel@lists.infradead.org; Tue, 23 Sep 2014 18:45:20 +0000 Received: by mail-we0-f174.google.com with SMTP id w62so4495064wes.5 for ; Tue, 23 Sep 2014 11:44:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=d1+ec5fm8Q3IUx0Kz3/3wN7r0rkwO4eqNTJX0zGefzc=; b=zNMFM7hrDEWvcwpBXxv832e8YXBpfr0qT56ESnlyA49RhGUHhhNpvQ3chzSZIvNOhk IHcfuF2xmTEaXfH60fW37eumaNKwfzBvQsA+RGZzpUBxovXTtiFfx1L9OBRtlxxDnlIY wjdZexTfUaWLa3lV91nIo8NOd/u3COZaPEnNDTxe/6Px62zlJKJKJGrqt2rl7N8qB5gq xOy+lDM6G/C+Ly9gIoqaRcxX907vVjQE/RrRTumKfLrIfQm+WTk4Gfj0MT1wLf72WBg7 5PSRvHGD10x1T/A2FfsKX+p1N0geOCfK0cXNNbtsHq+f9b6fWafvfuX6YJYx9/YHar2s Z1KA== X-Received: by 10.194.120.138 with SMTP id lc10mr1669344wjb.55.1411497897822; Tue, 23 Sep 2014 11:44:57 -0700 (PDT) Received: from cizrna.lan (37-48-33-192.tmcz.cz. [37.48.33.192]) by mx.google.com with ESMTPSA id pn5sm16871650wjc.4.2014.09.23.11.44.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Sep 2014 11:44:56 -0700 (PDT) From: Tomeu Vizoso To: Mike Turquette Subject: [PATCH v13 9/9] clk: Add docs about calling clk_put after clk_get_parent Date: Tue, 23 Sep 2014 20:44:17 +0200 Message-Id: <1411497857-24726-7-git-send-email-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1411497857-24726-1-git-send-email-tomeu.vizoso@collabora.com> References: <1411497613-24049-1-git-send-email-tomeu.vizoso@collabora.com> <1411497857-24726-1-git-send-email-tomeu.vizoso@collabora.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140923_114519_955322_50A8E8D0 X-CRM114-Status: UNSURE ( 9.79 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) Cc: Russell King , Tomeu Vizoso , Stephen Warren , Peter De Schrijver , linux-kernel@vger.kernel.org, tomasz.figa@gmail.com, rabin@rab.in, Thierry Reding , Javier Martinez Canillas , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As otherwise the per-user clk will be leaked. Signed-off-by: Tomeu Vizoso --- drivers/clk/clk.c | 3 ++- include/linux/clk.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index c507548..2c7baea 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -1828,7 +1828,8 @@ EXPORT_SYMBOL_GPL(clk_provider_get_parent); * clk_get_parent - return the parent of a clk * @clk_user: the clk whose parent gets returned * - * Simply returns clk->parent. Returns NULL if clk is NULL. + * Simply returns clk->parent. Returns NULL if clk is NULL. Caller must call + * clk_put() to release the returned struct clk. */ struct clk *clk_get_parent(struct clk *clk_user) { diff --git a/include/linux/clk.h b/include/linux/clk.h index 066b100..4f54952 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h @@ -306,7 +306,8 @@ int clk_set_parent(struct clk *clk, struct clk *parent); * @clk: clock source * * Returns struct clk corresponding to parent clock source, or - * valid IS_ERR() condition containing errno. + * valid IS_ERR() condition containing errno. Caller must call + * clk_put() to release the returned struct clk. */ struct clk *clk_get_parent(struct clk *clk);