From patchwork Wed Jun 1 23:15:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 9148603 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 9676F60751 for ; Wed, 1 Jun 2016 23:15:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 86DE1271CB for ; Wed, 1 Jun 2016 23:15:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 79AB2271F1; Wed, 1 Jun 2016 23:15:45 +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 E7597271CB for ; Wed, 1 Jun 2016 23:15:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751594AbcFAXPl (ORCPT ); Wed, 1 Jun 2016 19:15:41 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:35644 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750926AbcFAXPk (ORCPT ); Wed, 1 Jun 2016 19:15:40 -0400 Received: by mail-pa0-f43.google.com with SMTP id xk1so515024pac.2 for ; Wed, 01 Jun 2016 16:15:40 -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=1sCrmGGdCJ0MY9R8adVYfek1t+Ef0paaaAXxrM/h9vI=; b=KARnOtj4XabE7YpLUCsAGPsPlsyhIyH/01J0JNaeHLl81GdvQHyO6vZUTPikI1z0Ut LPFbyxmYkdi3L2Y1ZphFDTMDxta2CdZVV0U7kkHQt6VNjOeKXETwFhNeQzq0eawpN3rH KxHBG5CHiaPhGeiXIA30wgT9zQWPLUp6yD7hs= 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=1sCrmGGdCJ0MY9R8adVYfek1t+Ef0paaaAXxrM/h9vI=; b=Oanw0Wt0CKK757d+rtBkPAcY0Kd39cIWTH2aUXa3niAUMeB6RPfNheUscXlaHy6NP0 j254dS1oNuQtDH49lRcvG4bMR8mRmD00flxfZVEgAiYS2D//AI1xsrMtcqjHU/0Q9xNp MUGIMDYeq77SVnM7saIeZ+Vx6v2TYDpAOEv3OKCz//SwX3T2xEJBP9Bj1A/mYOFaUr2h JT+Mn6+6Tiw/wdIydamSXV0tBnxzF12s719i2CR0oRqdRKf9FgZpQ6vPwCtovT3/4tEb uNSh7v//dR+bsjcUqgoihBz1pGZSEynZs+rUR+ylL9hcK1EVIrFSvY2pApHd3QzaT4Rz uuQw== X-Gm-Message-State: ALyK8tJiMoa3O0TZ6HnVuOVVxEQ/1ypjnEXKP17P5+MCzh8Z981BJ0u7isADCjPeFI5LUTTO X-Received: by 10.66.15.8 with SMTP id t8mr819943pac.154.1464822938764; Wed, 01 Jun 2016 16:15:38 -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.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Jun 2016 16:15:38 -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, Rob Herring Subject: [PATCH 03/34] clk: highbank: Migrate to clk_hw based registration and OF APIs Date: Wed, 1 Jun 2016 16:15:02 -0700 Message-Id: <20160601231533.9354-4-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 in this driver, allowing us to move closer to a clear split of consumer and provider clk APIs. Cc: Rob Herring Signed-off-by: Stephen Boyd Acked-by: Rob Herring --- See commit 58657d189a2f and it's children for details on this new registration API. drivers/clk/clk-highbank.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/clk/clk-highbank.c b/drivers/clk/clk-highbank.c index be3a21abb185..727ed8e1bb72 100644 --- a/drivers/clk/clk-highbank.c +++ b/drivers/clk/clk-highbank.c @@ -275,7 +275,6 @@ static const struct clk_ops periclk_ops = { static __init struct clk *hb_clk_init(struct device_node *node, const struct clk_ops *ops) { u32 reg; - struct clk *clk; struct hb_clk *hb_clk; const char *clk_name = node->name; const char *parent_name; @@ -308,13 +307,13 @@ static __init struct clk *hb_clk_init(struct device_node *node, const struct clk hb_clk->hw.init = &init; - clk = clk_register(NULL, &hb_clk->hw); - if (WARN_ON(IS_ERR(clk))) { + rc = clk_hw_register(NULL, &hb_clk->hw); + if (WARN_ON(rc)) { kfree(hb_clk); return NULL; } - rc = of_clk_add_provider(node, of_clk_src_simple_get, clk); - return clk; + rc = of_clk_add_hw_provider(node, of_clk_hw_simple_get, &hb_clk->hw); + return hb_clk->hw.clk; } static void __init hb_pll_init(struct device_node *node)