From patchwork Mon Jul 11 02:53:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 963162 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p6B3gf2T027277 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 11 Jul 2011 03:43:03 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qg7OA-0000QR-IY; Mon, 11 Jul 2011 03:42:30 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Qg7OA-0004JR-6h; Mon, 11 Jul 2011 03:42:30 +0000 Received: from opensource.wolfsonmicro.com ([80.75.67.52] helo=opensource2.wolfsonmicro.com) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qg7O7-0004J7-Gc for linux-arm-kernel@lists.infradead.org; Mon, 11 Jul 2011 03:42:28 +0000 Received: from finisterre.wolfsonmicro.main (unknown [203.226.206.138]) by opensource2.wolfsonmicro.com (Postfix) with ESMTPSA id 1BB80114A20; Mon, 11 Jul 2011 04:42:24 +0100 (BST) Received: from broonie by finisterre.wolfsonmicro.main with local (Exim 4.76) (envelope-from ) id 1Qg6dF-000188-DI; Mon, 11 Jul 2011 11:54:01 +0900 From: Mark Brown To: Jeremy Kerr Subject: [PATCH 2/6] clk: Provide a dummy clk_unregister() Date: Mon, 11 Jul 2011 11:53:53 +0900 Message-Id: <1310352837-4277-2-git-send-email-broonie@opensource.wolfsonmicro.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1310352837-4277-1-git-send-email-broonie@opensource.wolfsonmicro.com> References: <20110711025344.GA27497@opensource.wolfsonmicro.com> <1310352837-4277-1-git-send-email-broonie@opensource.wolfsonmicro.com> X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110710_234227_670454_7E863DFC X-CRM114-Status: GOOD ( 11.95 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain Cc: Grant Likely , Mark Brown , linux-sh@vger.kernel.org, patches@opensource.wolfsonmicro.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 11 Jul 2011 03:43:03 +0000 (UTC) Even though unregistration is not actually supported by the clk API it is still useful to provide a clk_unregister() so that drivers can implement their unregistration code. This saves having to go back later and update them once unregistration is possible. Signed-off-by: Mark Brown --- include/linux/clk.h | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/include/linux/clk.h b/include/linux/clk.h index 2ca4f66..df5c64f 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h @@ -149,6 +149,21 @@ extern struct clk_hw_ops clk_gate_ops; struct clk *clk_register(struct clk_hw_ops *ops, struct clk_hw *hw, const char *name); +/** + * clk_unregister - remove a clock + * + * @clk: clock to unregister + * + * Remove a clock from the clk subsystem. This is currently not + * implemented but is provided to allow unregistration code to be + * written in drivers ready for use when an implementation is + * provided. + */ +static inline int clk_unregister(struct clk *clk) +{ + return -ENOTSUPP; +} + #else /* !CONFIG_GENERIC_CLK */ /*