From patchwork Wed Jun 1 23:15:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 69102 Delivered-To: patch@linaro.org Received: by 10.140.23.41 with SMTP id 38csp53805qgo; Wed, 1 Jun 2016 16:19:56 -0700 (PDT) X-Received: by 10.66.65.169 with SMTP id y9mr1175603pas.102.1464823196407; Wed, 01 Jun 2016 16:19:56 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id fe10si14076450pab.47.2016.06.01.16.19.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Jun 2016 16:19:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b8FO8-0006J0-Vp; Wed, 01 Jun 2016 23:17:24 +0000 Received: from mail-pf0-x22d.google.com ([2607:f8b0:400e:c00::22d]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b8FMr-0005F4-FI for linux-arm-kernel@lists.infradead.org; Wed, 01 Jun 2016 23:16:07 +0000 Received: by mail-pf0-x22d.google.com with SMTP id g64so23331543pfb.2 for ; Wed, 01 Jun 2016 16:15:45 -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=HQ6P03lvMXf/9w5oKfuAG4LPC5GGzq45LjY7Uodi8qQ=; b=Zn5u6+v+21ByBK5O2kBVsw+ydN31zxiS5RLw/1xE1s8wvPumgcc+VaA3DK+gOMJ34y NLaUqyuIuLIMUcR+rSVpTVWk8wCfQ88xTqXIYI0CIvCQruMuCkOPuraJf11vccxhf2G2 24CWVPwJWYBtmdYq2s+pAiNMhbpxBjb2Bezbg= 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=HQ6P03lvMXf/9w5oKfuAG4LPC5GGzq45LjY7Uodi8qQ=; b=jFeQhH0cpoH0cHRai1XgRexOpUOqUB2IJowPGuVAGA5jeWvUHtswKvU7zUubjLN1r2 AWPaPDlDACbkjQ1F20uDh08QEM/kwv7SMIA0f2RbjO7pT7n4Z4jDC4RarkcF/OaCIzZq 2xGn+fbeQRvGAg6Vwqn7ghi7jh38x2AxWIO2AFqr8Mpiaygv9sbWVSaZJHE+E7h0CDLd 8+4NSqKi18mDfok1UV8dHWALBVQXd5WzbvcCsIaK86DWV9GUNJIQvUYXbdbLrdgn78F5 ogKqlcfQsO3Xbf1KbXeeS6W6jlXTw39AYddSsH9ARh6kLL8/bdbi1lq4NGmz28Gdu3s1 8W9Q== X-Gm-Message-State: ALyK8tLB4hyEP9wW9f+cFFdBtf9BZeV3B7riRU7MoSMocv4741CaIpIoaayqctKe2lv3DstJ X-Received: by 10.98.66.86 with SMTP id p83mr13600303pfa.25.1464822944713; Wed, 01 Jun 2016 16:15:44 -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.15.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Jun 2016 16:15:44 -0700 (PDT) From: Stephen Boyd To: Michael Turquette , Stephen Boyd Subject: [PATCH 09/34] clk: axi-clkgen: Migrate to clk_hw based OF and registration APIs Date: Wed, 1 Jun 2016 16:15:08 -0700 Message-Id: <20160601231533.9354-10-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160601_161605_697381_648D87D2 X-CRM114-Status: GOOD ( 13.63 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:400e:c00:0:0:0:22d listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lars-Peter Clausen , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.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: Lars-Peter Clausen Signed-off-by: Stephen Boyd --- See commit 58657d189a2f and it's children for details on this new registration API. drivers/clk/clk-axi-clkgen.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/clk/clk-axi-clkgen.c b/drivers/clk/clk-axi-clkgen.c index 3294db3b4e4e..5e918e7afaba 100644 --- a/drivers/clk/clk-axi-clkgen.c +++ b/drivers/clk/clk-axi-clkgen.c @@ -392,8 +392,8 @@ static int axi_clkgen_probe(struct platform_device *pdev) const char *parent_names[2]; const char *clk_name; struct resource *mem; - struct clk *clk; unsigned int i; + int ret; if (!pdev->dev.of_node) return -ENODEV; @@ -433,12 +433,12 @@ static int axi_clkgen_probe(struct platform_device *pdev) axi_clkgen_mmcm_enable(axi_clkgen, false); axi_clkgen->clk_hw.init = &init; - clk = devm_clk_register(&pdev->dev, &axi_clkgen->clk_hw); - if (IS_ERR(clk)) - return PTR_ERR(clk); + ret = devm_clk_hw_register(&pdev->dev, &axi_clkgen->clk_hw); + if (ret) + return ret; - return of_clk_add_provider(pdev->dev.of_node, of_clk_src_simple_get, - clk); + return of_clk_add_hw_provider(pdev->dev.of_node, of_clk_hw_simple_get, + &axi_clkgen->clk_hw); } static int axi_clkgen_remove(struct platform_device *pdev)