From patchwork Wed Jun 1 23:15:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 9148635 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 1144360751 for ; Wed, 1 Jun 2016 23:17:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0418B271CB for ; Wed, 1 Jun 2016 23:17:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED504271F1; Wed, 1 Jun 2016 23:17:29 +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 678DC271CB for ; Wed, 1 Jun 2016 23:17:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751772AbcFAXR2 (ORCPT ); Wed, 1 Jun 2016 19:17:28 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:32845 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752285AbcFAXQI (ORCPT ); Wed, 1 Jun 2016 19:16:08 -0400 Received: by mail-pa0-f54.google.com with SMTP id um11so517368pab.0 for ; Wed, 01 Jun 2016 16:16:08 -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=pyd/k6aCWk61b15HmVkE6f/mTfkrkpNEi8CVHajaLxg=; b=cplAvMJSGsn9HmKRFgseWp42SZ6sRaS50Lt5PN+3Fl+140q5w0OS4xRdEls4tOxlQF 9F5BCB2+KxGaCu/J1XWATLWoGSa1C+KdDEwYSoRgBVFtUiTBZeuYb9IC/bF6+JPR1+kB Zso/dbapTFEzUkWCSAzON6TlhAyzoKvv7g9O4= 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=pyd/k6aCWk61b15HmVkE6f/mTfkrkpNEi8CVHajaLxg=; b=PZ8XfjqwL6Bxy8l0sPoSrqE7AVb+THkf9itbXVLVsQZsin5CHnF2wn2mhhUUb3UP7Z CHZKZJZMuB7PcNeNt6fAtVzo/Y8FGtrvS/kKhppL7s3qrYOOmGe60+4A7YfCrxJdfykg 3GXC5CB5EnDF6W0aaShlJnXSj0Kk6ttIgQ5ZvTz4Ru4rivhE+SrXxyCFvc0tQTFREd+Z V5mkJu0XA+mX621aDs/o7/l7xyUeACzrOlsD3OV6sohLANJBD+jEzk8rwj5uJ3EFyN5Y 5tJs0fWw9ffZ1MtljaPGM4YSElJ43RE7aASEwySl+7mhNl2cnf4hIBbgU4Zxnk2yq+5f B3vQ== X-Gm-Message-State: ALyK8tJDP6kLA6QoxiEjo65sAtKSlQdA5jh/sQY3hfxi4xGHlo1mTK/ZK2KeSSpVndj1R3Rm X-Received: by 10.66.118.106 with SMTP id kl10mr1150336pab.78.1464822968081; Wed, 01 Jun 2016 16:16:08 -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.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Jun 2016 16:16:07 -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, Peter Ujfalusi Subject: [PATCH 31/34] clk: twl6040: Migrate to clk_hw based registration APIs Date: Wed, 1 Jun 2016 16:15:30 -0700 Message-Id: <20160601231533.9354-32-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: Peter Ujfalusi Signed-off-by: Stephen Boyd --- See commit 58657d189a2f and it's children for details on this new registration API. drivers/clk/clk-twl6040.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clk/clk-twl6040.c b/drivers/clk/clk-twl6040.c index 697c66757400..8f4c1af5fb92 100644 --- a/drivers/clk/clk-twl6040.c +++ b/drivers/clk/clk-twl6040.c @@ -30,7 +30,6 @@ struct twl6040_clk { struct twl6040 *twl6040; struct device *dev; struct clk_hw mcpdm_fclk; - struct clk *clk; int enabled; }; @@ -80,6 +79,7 @@ static int twl6040_clk_probe(struct platform_device *pdev) { struct twl6040 *twl6040 = dev_get_drvdata(pdev->dev.parent); struct twl6040_clk *clkdata; + int ret; clkdata = devm_kzalloc(&pdev->dev, sizeof(*clkdata), GFP_KERNEL); if (!clkdata) @@ -89,9 +89,9 @@ static int twl6040_clk_probe(struct platform_device *pdev) clkdata->twl6040 = twl6040; clkdata->mcpdm_fclk.init = &wm831x_clkout_init; - clkdata->clk = devm_clk_register(&pdev->dev, &clkdata->mcpdm_fclk); - if (IS_ERR(clkdata->clk)) - return PTR_ERR(clkdata->clk); + ret = devm_clk_hw_register(&pdev->dev, &clkdata->mcpdm_fclk); + if (ret) + return ret; platform_set_drvdata(pdev, clkdata);