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: 9148665 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 E095E60751 for ; Wed, 1 Jun 2016 23:19:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D3593271CB for ; Wed, 1 Jun 2016 23:19:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C8364271F1; Wed, 1 Jun 2016 23:19:36 +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 780DC271CB for ; Wed, 1 Jun 2016 23:19:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751529AbcFAXTT (ORCPT ); Wed, 1 Jun 2016 19:19:19 -0400 Received: from mail-pf0-f173.google.com ([209.85.192.173]:33198 "EHLO mail-pf0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752162AbcFAXQE (ORCPT ); Wed, 1 Jun 2016 19:16:04 -0400 Received: by mail-pf0-f173.google.com with SMTP id b124so23338636pfb.0 for ; Wed, 01 Jun 2016 16:16:04 -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=Sr+0qagXT5MVZWbglutmLijdY7la6CyA0SQE1NwFOjijL/28JSGaH//hUITtilZ4ZJ R+Dh8rxTVB1YwkfkkaFuJVmsBwNyb2LjfpXgYJhTpD5Tz0hJcKVCy2ZuM6wWChQlfF9u B83afDHsO9WAki1N3j7h/BZlpwOAWyhiSSDbnUADU63743V/5/u0qnTcp09YCNNlgtwa KFuA3UDDKeqRLGAEakqP0cVRS8J7rcKWUOM7NySWClJJ48Ai3dkIcmIHQrmJImH+Du67 MHVYiknOXfC/zaV06mEod6y8sXukhFuaxtxSgRk2KUo/cm19aPlEPnPa5PIyJV9OGgff JnFg== X-Gm-Message-State: ALyK8tIFoB9X7GjeTPtb5l/jN18J93FbFeC/lWDXGYx0qCzFqEWXxRQYxZroUElWP9OrqDm2 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 Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth , Guenter Roeck , =?UTF-8?q?S=C3=B6ren=20Brinkmann?= , Mike Looijmans 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 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: 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;