From patchwork Mon Sep 23 15:45:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 2928991 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E53A7BFF05 for ; Mon, 23 Sep 2013 15:46:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CB1C62038B for ; Mon, 23 Sep 2013 15:46:36 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 57A522027D for ; Mon, 23 Sep 2013 15:46:35 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VO8LI-00077p-Lm; Mon, 23 Sep 2013 15:46:32 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VO8LG-0002dH-D3; Mon, 23 Sep 2013 15:46:30 +0000 Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VO8LD-0002cq-B0 for linux-arm-kernel@lists.infradead.org; Mon, 23 Sep 2013 15:46:28 +0000 Received: from ukl by metis.ext.pengutronix.de with local (Exim 4.72) (envelope-from ) id 1VO8Kn-0004Os-Sw; Mon, 23 Sep 2013 17:46:02 +0200 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: linux-arm-kernel@lists.infradead.org Date: Mon, 23 Sep 2013 17:45:59 +0200 Message-Id: <1379951159-8294-1-git-send-email-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 1.8.4.rc3 MIME-Version: 1.0 X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: ukl@pengutronix.de X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Subject: [PATCH] clk: fix function name in devm_clk_put kernel-doc comment X-SA-Exim-Version: 4.2.1 (built Mon, 22 Mar 2010 06:51:10 +0000) X-SA-Exim-Scanned: Yes (on metis.ext.pengutronix.de) X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130923_114627_720060_E7794005 X-CRM114-Status: GOOD ( 14.25 ) X-Spam-Score: -4.2 (----) Cc: Russell King , kernel@pengutronix.de X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The paragraph about clk_put already specifies this restriction about clk_put. Signed-off-by: Uwe Kleine-König --- Hello, I suspect that devm_clk_put is used more often than necessary. After some grepping around e.g. looking at drivers/tty/serial/clps711x.c it doesn't seem necessary to call it as the driver core already cares about calling the devm cleanup callbacks. The only reason I see being valid to call devm_clk_put is that a device continues to be bound and still it's sure that the clk in question isn't needed anymore. Ah, and maybe to enforce an order during cleanup, but then there is no reason to use devm, the normal functions would just do fine. I'm replying to this mail with a few patches. Best regards Uwe include/linux/clk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/clk.h b/include/linux/clk.h index 9a6d045..c713ba0 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h @@ -214,7 +214,7 @@ void clk_put(struct clk *clk); * clock source are balanced by clk_disable calls prior to calling * this function. * - * clk_put should not be called from within interrupt context. + * devm_clk_put should not be called from within interrupt context. */ void devm_clk_put(struct device *dev, struct clk *clk);