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: 9148625 X-Patchwork-Delegate: sboyd@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C5B1260751 for ; Wed, 1 Jun 2016 23:16:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B84752675C for ; Wed, 1 Jun 2016 23:16:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ACEE32714B; Wed, 1 Jun 2016 23:16:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45B4D271CB for ; Wed, 1 Jun 2016 23:16:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752375AbcFAXQO (ORCPT ); Wed, 1 Jun 2016 19:16:14 -0400 Received: from mail-pf0-f181.google.com ([209.85.192.181]:34179 "EHLO mail-pf0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752361AbcFAXQL (ORCPT ); Wed, 1 Jun 2016 19:16:11 -0400 Received: by mail-pf0-f181.google.com with SMTP id 62so23304349pfd.1 for ; Wed, 01 Jun 2016 16:16:11 -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=YVwbjVLDckzn4fKuyN9a99fF9/KdwZtVLvDh7cVDaRA4Z5WVdHS558ideHpy/Yl5GR YBZ0/NQtFyWz5LId0I8Bca4BREuCZY+wnv12hSDUrdL/eFLxBhHReIe7lQisFa77u85v /zm92XPplJLLWM62qMLlK2seidWlUGC7xT57CzxzqJ39QP/XmtmU6qn/UcgxCF9r4266 RKD6eWtBaYfiLZC3lTnQ48ttrAJTZYjjaR5NOz797Tl2Zjnz+fWrioyBUz+OMUQ27TVI 4o+0RSfhVAcw4tZwR7ZIBTCvwVLxs4sPV6+bwPtzHXAx4oGA8lbvS+WyBgEJcyDa1Bof wAlA== X-Gm-Message-State: ALyK8tLUiF7yH/81WryathJiOoBT807KkXt5pQibLjW06Ewf6En73JJpoW0EqbMJVlW+/VOF 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-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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);