From patchwork Wed Jun 1 23:15:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 9148787 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 7213B600BC for ; Wed, 1 Jun 2016 23:25:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 64BDF26FA0 for ; Wed, 1 Jun 2016 23:25:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59A7327224; Wed, 1 Jun 2016 23:25: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 DD1E026FA0 for ; Wed, 1 Jun 2016 23:25: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 1b8FTX-0007Cj-1J; Wed, 01 Jun 2016 23:22:59 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b8FNE-0005UK-6v for linux-arm-kernel@bombadil.infradead.org; Wed, 01 Jun 2016 23:16:28 +0000 Received: from mail-pf0-x232.google.com ([2607:f8b0:400e:c00::232]) by casper.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1b8FNC-0008VF-Bm for linux-arm-kernel@lists.infradead.org; Wed, 01 Jun 2016 23:16:27 +0000 Received: by mail-pf0-x232.google.com with SMTP id 62so23303269pfd.1 for ; Wed, 01 Jun 2016 16:16:05 -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 :mime-version:content-transfer-encoding; bh=FunMHttY137MkrAdpAmvTnNqB/OpSzucDntJydRKn2Y=; b=RHS0rH0YtUqUgRaGUVwLj6Jn1vClLgDTrqnm/R5Ckpa5YkD3SU8/9uTIN1nq7cASzl VOV4AW31cxdNGjgrHkQ0VflueUHN/X+ZEnGNC/Rq/kNKz+304QnYFrOccdCKs7bAPtKF sQOpdFCesd5oqaaVXz2ZVUx86Ayw90F9AKDCQ= 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:mime-version:content-transfer-encoding; bh=FunMHttY137MkrAdpAmvTnNqB/OpSzucDntJydRKn2Y=; b=kjo4BNifVC7uSDyZ6+EPPwK8YfenzocJSES6CeUsfjjfyqQUV2NtIfuCgNCC0V+eDg U57B2NHYIWZtq50aXxS2pYyPolwrWOIyTca0NMB4LcOD4nPg2ntSMibzTdOcrIvKT9xW L6FO7/HArRmAseV6rU4L6P/bCwarQ7NlwciYYLs0hB1i754kOs1N7XAkBNaoPRJdbCix MYnJ4QyVH9BNcLN/Nfwi/1YeKq4d/RYO5AUickhbpl8ygPtxoHUBbOMVx59AHD3lOSYJ /gleGggBA/BC3iJcxrCZtxck4C6earEUA38Icxu70pOODHisrrdzV3Zt25NCr4I3GGHB g+kw== X-Gm-Message-State: ALyK8tK5vDPL7DiD5KqYqTa2f0gMEueWjIDab3WajTHNvLJfF8F6hgl7rNn/2CbfIYakQvge X-Received: by 10.98.44.134 with SMTP id s128mr9400989pfs.153.1464822963740; Wed, 01 Jun 2016 16:16:03 -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.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Jun 2016 16:16:03 -0700 (PDT) From: Stephen Boyd To: Michael Turquette , Stephen Boyd Subject: [PATCH 27/34] clk: si514: Migrate to clk_hw based OF and registration APIs Date: Wed, 1 Jun 2016 16:15:26 -0700 Message-Id: <20160601231533.9354-28-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> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160602_001626_568315_0B76560C X-CRM114-Status: GOOD ( 15.17 ) 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: linux-arm-kernel@lists.infradead.org, Mike Looijmans , linux-kernel@vger.kernel.org, Guenter Roeck , linux-clk@vger.kernel.org, =?UTF-8?q?S=C3=B6ren=20Brinkmann?= , Sebastian Hesselbarth 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: Sebastian Hesselbarth Cc: Guenter Roeck Cc: Sören Brinkmann Cc: Mike Looijmans Signed-off-by: Stephen Boyd --- See commit 58657d189a2f and it's children for details on this new registration API. drivers/clk/clk-si514.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/clk/clk-si514.c b/drivers/clk/clk-si514.c index ceef25b0990b..09b6718956bd 100644 --- a/drivers/clk/clk-si514.c +++ b/drivers/clk/clk-si514.c @@ -305,7 +305,6 @@ static int si514_probe(struct i2c_client *client, { struct clk_si514 *data; struct clk_init_data init; - struct clk *clk; int err; data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL); @@ -330,13 +329,13 @@ static int si514_probe(struct i2c_client *client, i2c_set_clientdata(client, data); - clk = devm_clk_register(&client->dev, &data->hw); - if (IS_ERR(clk)) { + err = devm_clk_hw_register(&client->dev, &data->hw); + if (err) { dev_err(&client->dev, "clock registration failed\n"); - return PTR_ERR(clk); + return err; } - err = of_clk_add_provider(client->dev.of_node, of_clk_src_simple_get, - clk); + err = of_clk_add_hw_provider(client->dev.of_node, of_clk_hw_simple_get, + &data->hw); if (err) { dev_err(&client->dev, "unable to add clk provider\n"); return err;