From patchwork Wed Jun 1 23:15:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 9148755 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 37606600BC for ; Wed, 1 Jun 2016 23:23:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 29B0426FA0 for ; Wed, 1 Jun 2016 23:23:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E5F0271F1; Wed, 1 Jun 2016 23:23: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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A86E726FA0 for ; Wed, 1 Jun 2016 23:23:39 +0000 (UTC) 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 1b8FRo-0004R6-8s; Wed, 01 Jun 2016 23:21:12 +0000 Received: from mail-pf0-f181.google.com ([209.85.192.181]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b8FN6-0005HZ-P1 for linux-arm-kernel@lists.infradead.org; Wed, 01 Jun 2016 23:16:22 +0000 Received: by mail-pf0-f181.google.com with SMTP id g64so23333504pfb.2 for ; Wed, 01 Jun 2016 16:16:00 -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=z7/NYEkSGM5QVx5bLc6Xkrs4tw1FpwrFe2jlXk/oqaI=; b=XACytuJGjKSBryqNde/K+eETJTHwv+XSupRQDVb6PyASReqLWflzxaMDiz1KBJaEy7 CoF9sOo1NHWjqY7d7VasUhV07MU4bZ65MZW9ozNzR0q6C3xvpkVeBcm2bWAPs50WZrAW i+HhD3B/Iw6U9JmoEHtJyPl0qKAiYyoWbSEFc= 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=z7/NYEkSGM5QVx5bLc6Xkrs4tw1FpwrFe2jlXk/oqaI=; b=XSZbNRJgAlR1c66kHqbxEBFmo2oKwKnpnx9yg0LyTtONPRaGSsblnCoaFgmV3+RfpH iBHBesBYdvkwPiRK4QZ7cE1cKzzj5ECcazdaFOQadv0SMYH/Gv/OD6Sdq+7aaIC8xCdM NmCDtjuYRIt975yX9oJMtM8DR1kRkQIYm2zDZsl+QXKW20iYaSZBazfKnLWthQA+9kXK fwDjcXXnB2wbBiMH1PeuLz198ZWEC+tCFEM/ZQ4tn6PoQbOCfeSggnrEIMtuBjs0u/aH pJQ/cGvGTZiF48MOTjUcDvM8+ac54/79wjgjSsvPDPleNbX8wjhA3a4n+rnsz/MNWSGp 30kg== X-Gm-Message-State: ALyK8tJVk7e80HpGbY2Qz+Zl6NjnsOfaP5U+HSv1rGeb9ljFoVFpw7poHnVJah2qFlWMsX2l X-Received: by 10.98.94.194 with SMTP id s185mr13558116pfb.32.1464822959895; Wed, 01 Jun 2016 16:15:59 -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.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Jun 2016 16:15:59 -0700 (PDT) From: Stephen Boyd To: Michael Turquette , Stephen Boyd Subject: [PATCH 23/34] clk: pwm: Migrate to clk_hw based OF and registration APIs Date: Wed, 1 Jun 2016 16:15:22 -0700 Message-Id: <20160601231533.9354-24-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_161620_956377_2AE572BF X-CRM114-Status: GOOD ( 12.69 ) 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: Philipp Zabel , Janusz Uzycki , 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+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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: Janusz Uzycki Cc: Philipp Zabel Signed-off-by: Stephen Boyd --- See commit 58657d189a2f and it's children for details on this new registration API. drivers/clk/clk-pwm.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/clk/clk-pwm.c b/drivers/clk/clk-pwm.c index 1630a1f085f7..8cb9d117fdbf 100644 --- a/drivers/clk/clk-pwm.c +++ b/drivers/clk/clk-pwm.c @@ -61,7 +61,6 @@ static int clk_pwm_probe(struct platform_device *pdev) struct pwm_device *pwm; struct pwm_args pargs; const char *clk_name; - struct clk *clk; int ret; clk_pwm = devm_kzalloc(&pdev->dev, sizeof(*clk_pwm), GFP_KERNEL); @@ -107,11 +106,11 @@ static int clk_pwm_probe(struct platform_device *pdev) clk_pwm->pwm = pwm; clk_pwm->hw.init = &init; - clk = devm_clk_register(&pdev->dev, &clk_pwm->hw); - if (IS_ERR(clk)) - return PTR_ERR(clk); + ret = devm_clk_hw_register(&pdev->dev, &clk_pwm->hw); + if (ret) + return ret; - return of_clk_add_provider(node, of_clk_src_simple_get, clk); + return of_clk_add_hw_provider(node, of_clk_hw_simple_get, &clk_pwm->hw); } static int clk_pwm_remove(struct platform_device *pdev)