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: 277257 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from casper.infradead.org (unknown [IPv6:2001:770:15f::2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 872852C00FE for ; Tue, 24 Sep 2013 01:46:40 +1000 (EST) 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.2 (2011-06-06) on metis.extern.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=4.0 tests=BAYES_00,NO_RELAYS shortcircuit=no autolearn=ham version=3.3.2 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 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Russell King , kernel@pengutronix.de X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org 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);