Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752418AbcDVVow (ORCPT ); Fri, 22 Apr 2016 17:44:52 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:51689 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751742AbcDVVov (ORCPT ); Fri, 22 Apr 2016 17:44:51 -0400 Date: Fri, 22 Apr 2016 14:44:49 -0700 From: Stephen Boyd To: Michael Turquette Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 02/13] clk: Add {devm_}clk_hw_{register,unregister}() APIs Message-ID: <20160422214449.GH13149@codeaurora.org> References: <1461277324-27185-1-git-send-email-sboyd@codeaurora.org> <1461277324-27185-3-git-send-email-sboyd@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1461277324-27185-3-git-send-email-sboyd@codeaurora.org> X-Patchwork-State: Applied User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 936 Lines: 23 On 04/21, Stephen Boyd wrote: > We've largely split the clk consumer and provider APIs along > struct clk and struct clk_hw, but clk_register() still returns a > struct clk pointer for each struct clk_hw that's registered. > Eventually we'd like to only allocate struct clks when there's a > user, because struct clk is per-user now, so clk_register() needs > to change. > > Let's add new APIs to register struct clk_hws, but this time > we'll hide the struct clk from the caller by returning an int > error code. Also add an unregistration API that takes the clk_hw > structure that was passed to the registration API. This way > provider drivers never have to deal with a struct clk pointer > unless they're using the clk consumer APIs. > > Signed-off-by: Stephen Boyd > --- Applied to clk-next -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project