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: 9148757 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 3D328600BC for ; Wed, 1 Jun 2016 23:23:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2FC1B26FA0 for ; Wed, 1 Jun 2016 23:23:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2480B27224; Wed, 1 Jun 2016 23:23:44 +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 8961C26FA0 for ; Wed, 1 Jun 2016 23:23:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751315AbcFAXWz (ORCPT ); Wed, 1 Jun 2016 19:22:55 -0400 Received: from mail-pf0-f175.google.com ([209.85.192.175]:35898 "EHLO mail-pf0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751802AbcFAXPp (ORCPT ); Wed, 1 Jun 2016 19:15:45 -0400 Received: by mail-pf0-f175.google.com with SMTP id f144so23298393pfa.3 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=cZ9FmdOgK5xf0PLn/rKTNd7prajJZcRDgqp4e5V9PRD1bGpwlKbXITaiBtk6eQl2YC 7KGVkQu/Wb935/t60wXwMUfBXhIuo8oazsa67j58H7g443oXXEw9FJ1RqpM837/lwRJ/ 926qJrpJs4jiAUcd9QJdUUx9wy0oH4kS75wSQaz9temAY32FC1hW8clmpyIcauNcZbqC r03DWtwmJL3dIgoXOJhGp2bIrvFK+e0s1T55M9wdiH7NtZ0s2DkGvkeSLX6rUsb8myig OZbFrcMvCOgcwOZ7lascvJtaW1Id1ecHfmk1KmLHOVYt1uro/c2A6zFs5E1dJtdto2IA OZrA== X-Gm-Message-State: ALyK8tL90JqX+F6T1M4xLYM4T+1LPXc5i0qZcpd0AU+V4gjQ37hbs9nWrYmx9DSdDcnBcaBG 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 Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Lars-Peter Clausen 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> 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: 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(-) 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)