linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
To: Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	s.hauer@pengutronix.de, linux-clk@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Subject: [PATCH v5 6/8] clk: core: Avoid double initialization of clocks
Date: Tue,  5 Jul 2016 18:23:32 +0200	[thread overview]
Message-ID: <1467735814-23518-9-git-send-email-ricardo.ribalda@gmail.com> (raw)
In-Reply-To: <1467735814-23518-1-git-send-email-ricardo.ribalda@gmail.com>

Some clock providers can be initialized via of_clk_init() and also via
platform device probe.

Avoid double initialization of them by setting the OF_POPULATED flag.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
---
 drivers/clk/clk.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 820a939fb6bb..f0403b87f468 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -3451,6 +3451,10 @@ void __init of_clk_init(const struct of_device_id *matches)
 					&clk_provider_list, node) {
 			if (force || parent_ready(clk_provider->np)) {
 
+				/* Don't populate platform devices */
+				of_node_set_flag(clk_provider->np,
+						 OF_POPULATED);
+
 				clk_provider->clk_init_cb(clk_provider->np);
 				of_clk_set_defaults(clk_provider->np, true);
 
-- 
2.8.1

  parent reply	other threads:[~2016-07-05 16:24 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-05 16:23 [PATCH v5 0/8] clk: Don't duplicate initialization on platform_dev Ricardo Ribalda Delgado
2016-07-05 16:23 ` [PATCH v5 1/8] clk: core: New macro CLK_OF_DECLARE_DRIVER Ricardo Ribalda Delgado
2016-08-13  1:16   ` Stephen Boyd
2016-07-05 16:23 ` [PATCH v5 2/8] clk: axis: Use new " Ricardo Ribalda Delgado
2016-08-13  1:16   ` Stephen Boyd
2016-07-05 16:23 ` [PATCH v5 3/8] clk: npx: " Ricardo Ribalda Delgado
2016-08-13  1:16   ` Stephen Boyd
2016-07-05 16:23 ` [PATCH v5 4/8] clk: sunxi: mod0: " Ricardo Ribalda Delgado
2016-08-13  1:16   ` Stephen Boyd
2016-07-05 16:23 ` [PATCH v5 4/8] clk: sunxi: " Ricardo Ribalda Delgado
2016-08-13  1:16   ` Stephen Boyd
2016-07-05 16:23 ` [PATCH v5 5/8] clk: sunxi: apb0: " Ricardo Ribalda Delgado
2016-08-13  1:16   ` Stephen Boyd
2016-07-05 16:23 ` [PATCH v5 5/8] clk: sunxi: " Ricardo Ribalda Delgado
2016-08-13  1:16   ` Stephen Boyd
2016-07-05 16:23 ` Ricardo Ribalda Delgado [this message]
2016-08-13  1:16   ` [PATCH v5 6/8] clk: core: Avoid double initialization of clocks Stephen Boyd
2016-07-05 16:23 ` [PATCH v5 7/8] clk: fixed-factor: Convert into a module platform driver Ricardo Ribalda Delgado
2016-08-13  1:16   ` Stephen Boyd
2016-07-05 16:23 ` [PATCH v5 8/8] clk: fixed-rate: " Ricardo Ribalda Delgado
2016-08-13  1:16   ` Stephen Boyd
2018-10-18 19:20   ` Alan Tull
2018-10-18 20:02     ` Ricardo Ribalda Delgado
2018-10-18 20:25       ` Stephen Boyd
2018-10-18 20:24     ` Stephen Boyd
2018-10-18 20:33       ` Alan Tull
2016-07-18 20:19 ` [PATCH v5 0/8] clk: Don't duplicate initialization on platform_dev Ricardo Ribalda Delgado

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1467735814-23518-9-git-send-email-ricardo.ribalda@gmail.com \
    --to=ricardo.ribalda@gmail.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=s.hauer@pengutronix.de \
    --cc=sboyd@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).