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: 69086 Delivered-To: patch@linaro.org Received: by 10.140.23.41 with SMTP id 38csp53091qgo; Wed, 1 Jun 2016 16:17:45 -0700 (PDT) X-Received: by 10.66.73.193 with SMTP id n1mr1150920pav.70.1464823065504; Wed, 01 Jun 2016 16:17:45 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ab11si36881525pac.38.2016.06.01.16.17.45; Wed, 01 Jun 2016 16:17:45 -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 S1752645AbcFAXR3 (ORCPT + 30 others); Wed, 1 Jun 2016 19:17:29 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:35988 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752279AbcFAXQI (ORCPT ); Wed, 1 Jun 2016 19:16:08 -0400 Received: by mail-pa0-f49.google.com with SMTP id eu11so515405pad.3 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=g+/IUajIXrSipvSsUdPCFHhc6hhlIv7X/bf/VGsUn7wa7CR7o+2L+b5MvLj8XcHDxf UxdniCoZbe6PN+TfnW1ta9NgkSkpdW7bnPU6ZJjK+FSl3VlMoCGb5cafWLGHcwXXG3Lq wnKdkB4uRSL2aej9Mpv5USZ8uwMxEUKKqxbk8A3hNN8fhPFBOq+kGmETQDyhXoV/1vDf ZdehZG5i5jhAiF3McYMFxXPU3NCCPjafeXpfBdaC2VoqVlLrVCjr9EwvE8s+JKIHflMj 3Dz37DAWnP7erZh71cGM2PTHPz2pUDvUnJ6fuB75AxyQMT8wxUqYkgKKMfTU2eoF/5KG JBSw== X-Gm-Message-State: ALyK8tKHcYr8UhFOxOOlbJmAlmoh7j+3ksP47AiyHY2KDqJT4nIGOYPOuaBRmp/GUQpfEfD1 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-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: 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(-) -- 2.7.4 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);