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: 69088 Delivered-To: patch@linaro.org Received: by 10.140.23.41 with SMTP id 38csp53256qgo; Wed, 1 Jun 2016 16:18:11 -0700 (PDT) X-Received: by 10.98.32.140 with SMTP id m12mr13634393pfj.119.1464823091635; Wed, 01 Jun 2016 16:18:11 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id 66si4348070pfo.203.2016.06.01.16.18.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Jun 2016 16:18:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org 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 1b8FMw-0005LX-Vy; Wed, 01 Jun 2016 23:16:11 +0000 Received: from mail-pa0-x22c.google.com ([2607:f8b0:400e:c03::22c]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b8FMl-0005CN-JS for linux-arm-kernel@lists.infradead.org; Wed, 01 Jun 2016 23:16:00 +0000 Received: by mail-pa0-x22c.google.com with SMTP id eu11so512519pad.3 for ; Wed, 01 Jun 2016 16:15:39 -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=dMABR8Y2vIdIlwuJqHBaeoPB57YYtg+wPbVuuSPCJJLTy/O3uAVJEP+PD3uARf9ETz XA6QNwAx2zUDmlLmm3lbWUSswDjnkDwvZZxeYwSvHEW/25NGRglaML75vMIel7KjfFg5 8PIYSL/bXSe5i7v/kQFEvUQpaCXNdmuSQuTK7bGjMQXEXqqPupDYMJt/IfpoFIT8qsfF NhHjFhxQgiW/7wxM5mKPcGjSyHpmhX/FZwIVI1ofBVTMy4JgB0PpgoJpU/n0PnLbY7TW 6RNw6E3ti8svWKO58mtbpbjbKJmbAvqHcwYFoD5di8SBTWIXsoaKCpYI3alBoO5eF4lf 2ROg== X-Gm-Message-State: ALyK8tKG8kmphoRH06vlrQ3bwFLmkMaT2IOCsoAHr/W58nq5PfjfRfqEx9GRZa8m3VPfgA6o 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160601_161559_749177_B8EF6CEE X-CRM114-Status: GOOD ( 13.11 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:400e:c03:0:0:0:22c listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 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-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+patch=linaro.org@lists.infradead.org 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 --- 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(-) -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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)