Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754027Ab1BOCAr (ORCPT ); Mon, 14 Feb 2011 21:00:47 -0500 Received: from adelie.canonical.com ([91.189.90.139]:43293 "EHLO adelie.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751995Ab1BOCAo (ORCPT ); Mon, 14 Feb 2011 21:00:44 -0500 From: Jeremy Kerr To: linux-arm-kernel@lists.infradead.org Subject: Re: [RFC, PATCH 3/3] clk: add warnings for incorrect enable/prepare semantics Date: Tue, 15 Feb 2011 10:00:28 +0800 User-Agent: KMail/1.13.5 (Linux/2.6.35-25-generic; KDE/4.5.1; x86_64; ; ) Cc: Richard Zhao , Nicolas Pitre , Dima Zavin , Lorenzo Pieralisi , Vincent Guittot , linux-sh@vger.kernel.org, Ben Herrenschmidt , Sascha Hauer , linux-kernel@vger.kernel.org, Paul Mundt , Saravana Kannan , Ben Dooks , "Uwe =?iso-8859-1?q?Kleine-K=F6nig?=" , Russell King References: <1297233693.241680.897691111624.0.gpush@pororo> <1297233693.243373.411051105619.3.gpush@pororo> <20110210093756.GA24710@b20223-02.ap.freescale.net> In-Reply-To: <20110210093756.GA24710@b20223-02.ap.freescale.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201102151000.29385.jeremy.kerr@canonical.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 544 Lines: 20 Hi Richard, > > void clk_unprepare(struct clk *clk) > > { > > > > + WARN_ON(clk->enable_count != 0); > > + > > Other drivers may be using the clock and increased the enable_count. > This check may be moved to where we actually do unprepare. Of course, thanks. Will update the series. Jeremy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/