mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <>
To: Barebox List <>
Subject: [PATCH 2/2] of: Fix deep-probe triggering when removing nodes
Date: Fri, 25 Jun 2021 16:02:06 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

During deletion of device nodes of_find_device_by_node() is called in
order to set the device_node pointer of the device corresponding to
the to-be-deleted node to NULL. This is not necessary anymore as the
live tree should not be deleted.
This fixes problems with deep-probe support. of_find_device_by_node()
calls of_device_ensure_probed(), but this may only be called on the
live tree, not on arbitrary nodes that shall be deleted.

Signed-off-by: Sascha Hauer <>
 drivers/of/base.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index 551b41fc9e..9a8fdc81e8 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -2436,7 +2436,6 @@ void of_delete_node(struct device_node *node)
 	struct device_node *n, *nt;
 	struct property *p, *pt;
-	struct device_d *dev;
 	if (!node)
@@ -2457,10 +2456,6 @@ void of_delete_node(struct device_node *node)
-	dev = of_find_device_by_node(node);
-	if (dev)
-		dev->device_node = NULL;

barebox mailing list

      reply	other threads:[~2021-06-25 14:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-25 14:02 [PATCH 1/2] of: refuse to delete root node of live tree Sascha Hauer
2021-06-25 14:02 ` Sascha Hauer [this message]

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:

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

  git send-email \ \ \ \
    --subject='Re: [PATCH 2/2] of: Fix deep-probe triggering when removing nodes' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox