From patchwork Wed Jun 1 23:15:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 69082 Delivered-To: patch@linaro.org Received: by 10.140.23.41 with SMTP id 38csp52755qgo; Wed, 1 Jun 2016 16:16:41 -0700 (PDT) X-Received: by 10.98.34.25 with SMTP id i25mr13750081pfi.35.1464823001309; Wed, 01 Jun 2016 16:16:41 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f191si53858190pfc.101.2016.06.01.16.16.40; Wed, 01 Jun 2016 16:16:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752417AbcFAXQQ (ORCPT + 30 others); Wed, 1 Jun 2016 19:16:16 -0400 Received: from mail-pf0-f177.google.com ([209.85.192.177]:34182 "EHLO mail-pf0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751817AbcFAXQM (ORCPT ); Wed, 1 Jun 2016 19:16:12 -0400 Received: by mail-pf0-f177.google.com with SMTP id 62so23304483pfd.1 for ; Wed, 01 Jun 2016 16:16:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UWlQ7wMR2SPmRIiMR+mcYEImvveSI1ogD9A5YXHneMI=; b=MVY2C5jA5S14G+u1dhYcfwPQTbxYAN6pJ50yK8jHVBiqJ2jc+N/bSGzZvjiGWR09qm guJwGWnr7/Rmt8mtruTzpMwuWS8Gd/Xx9Xbmd0uRnhz6yLvLUXs1AQ+Gxr5xelSu8hU9 uwKpoHbrm7P+tFWUhpVRY2QJo0q5A9RHzRv3k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=UWlQ7wMR2SPmRIiMR+mcYEImvveSI1ogD9A5YXHneMI=; b=UGPFF3vQ4vZMtKNeNkMdNiKJV0n9DiRTS8S8Ri35MB7nfZeXabUxWWtZJ9UXxdBV3M 2W2UO7wUk5qvhZTTkMN8aS1hqwTe9nLL+y42ZgVDs56fBg1Sfic+uTMQNfbfBjrHjx4N ggXt8YAGkv4K+XkLZJnvqit+BljdMXZ2Qw/MDquO8na7rnBxeSeU3BtIhZ8LVQxQ+JSc BHPLTb7d4hTs28BZxu2UXXx/xw0UOTtk8T+9J1uav+i/KBKQHYCZeg3z+Rv2n42mCDKQ 2Uak4NtalGR87iVJNjIDGzTe3KZYOx7Xbpgd5X3Clzmc/WQTaqFDhBsqxNUrsUTvkUfj /3ew== X-Gm-Message-State: ALyK8tJeh00jm8y2+yA3dHlA+JWgEvXwb5xS+KrQPu1q+k/wk+bD0Y0xLv1z/JjkEB3liM+8 X-Received: by 10.98.87.149 with SMTP id i21mr13851475pfj.50.1464822971133; Wed, 01 Jun 2016 16:16:11 -0700 (PDT) Received: from localhost.localdomain (pat_11.qualcomm.com. [192.35.156.11]) by smtp.gmail.com with ESMTPSA id r64sm20967395pfi.54.2016.06.01.16.16.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Jun 2016 16:16:10 -0700 (PDT) From: Stephen Boyd To: Michael Turquette , Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Mark Brown Subject: [PATCH 34/34] clk: wm831x: Migrate to clk_hw based registration APIs Date: Wed, 1 Jun 2016 16:15:33 -0700 Message-Id: <20160601231533.9354-35-stephen.boyd@linaro.org> X-Mailer: git-send-email 2.9.0-rc1 In-Reply-To: <20160601231533.9354-1-stephen.boyd@linaro.org> References: <20160601231533.9354-1-stephen.boyd@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Cc: Mark Brown Signed-off-by: Stephen Boyd --- See commit 58657d189a2f and it's children for details on this new registration API. drivers/clk/clk-wm831x.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) -- 2.7.4 diff --git a/drivers/clk/clk-wm831x.c b/drivers/clk/clk-wm831x.c index 88def4b2761c..f4fdac55727c 100644 --- a/drivers/clk/clk-wm831x.c +++ b/drivers/clk/clk-wm831x.c @@ -24,9 +24,6 @@ struct wm831x_clk { struct clk_hw xtal_hw; struct clk_hw fll_hw; struct clk_hw clkout_hw; - struct clk *xtal; - struct clk *fll; - struct clk *clkout; bool xtal_ena; }; @@ -370,19 +367,19 @@ static int wm831x_clk_probe(struct platform_device *pdev) clkdata->xtal_ena = ret & WM831X_XTAL_ENA; clkdata->xtal_hw.init = &wm831x_xtal_init; - clkdata->xtal = devm_clk_register(&pdev->dev, &clkdata->xtal_hw); - if (IS_ERR(clkdata->xtal)) - return PTR_ERR(clkdata->xtal); + ret = devm_clk_hw_register(&pdev->dev, &clkdata->xtal_hw); + if (ret) + return ret; clkdata->fll_hw.init = &wm831x_fll_init; - clkdata->fll = devm_clk_register(&pdev->dev, &clkdata->fll_hw); - if (IS_ERR(clkdata->fll)) - return PTR_ERR(clkdata->fll); + ret = devm_clk_hw_register(&pdev->dev, &clkdata->fll_hw); + if (ret) + return ret; clkdata->clkout_hw.init = &wm831x_clkout_init; - clkdata->clkout = devm_clk_register(&pdev->dev, &clkdata->clkout_hw); - if (IS_ERR(clkdata->clkout)) - return PTR_ERR(clkdata->clkout); + ret = devm_clk_hw_register(&pdev->dev, &clkdata->clkout_hw); + if (ret) + return ret; platform_set_drvdata(pdev, clkdata);