Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932659AbbBBRuV (ORCPT ); Mon, 2 Feb 2015 12:50:21 -0500 Received: from pandora.arm.linux.org.uk ([78.32.30.218]:43220 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753287AbbBBRuS (ORCPT ); Mon, 2 Feb 2015 12:50:18 -0500 Date: Mon, 2 Feb 2015 17:49:45 +0000 From: Russell King - ARM Linux To: Mike Turquette Cc: Tony Lindgren , Geert Uytterhoeven , Tomeu Vizoso , Stephen Boyd , Linux MIPS Mailing List , "linux-doc@vger.kernel.org" , Chao Xie , Haojian Zhuang , Boris Brezillon , Jonathan Corbet , Emilio L??pez , Linux-sh list , Alex Elder , Zhangfei Gao , Bintian Wang , Matt Porter , "linux-omap@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Ralf Baechle , Tero Kristo , Manuel Lauss , Maxime Ripard , Javier Martinez Canillas Subject: Re: [PATCH v13 4/6] clk: Add rate constraints to clocks Message-ID: <20150202174945.GA8670@n2100.arm.linux.org.uk> References: <1422011024-32283-1-git-send-email-tomeu.vizoso@collabora.com> <1422011024-32283-5-git-send-email-tomeu.vizoso@collabora.com> <54CA8662.7040008@codeaurora.org> <20150131013158.GA4323@codeaurora.org> <20150201221856.421.6151@quantum> <20150202161237.GG16250@atomide.com> <20150202174646.421.52331@quantum> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150202174646.421.52331@quantum> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1170 Lines: 34 On Mon, Feb 02, 2015 at 09:46:46AM -0800, Mike Turquette wrote: > This looks like mis-matched enable/disable calls. We now have unique > struct clk pointers for every call to clk_get. I haven't yet looked > through the hwmod code but I have a feeling that we're doing something > like this: > > /* enable clock */ > my_clk = clk_get(...); > clk_prepare_enable(my_clk); > clk_put(my_clk); > > /* do some work */ > do_work(); > > /* disable clock */ > my_clk = clk_get(...); > clk_disable_unprepare(my_clk); > clk_put(my_clk); > > The above pattern no longer works since my_clk will be two different > unique pointers, but it really should be one stable pointer across the > whole usage of the clk. E.g: Yes, it has always been documented that shall be the case. Anyone doing the above is basically broken. -- FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net. -- 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/