Linux ACPI
 help / color / mirror / Atom feed
* [PATCH] software node: fix node group deregistration kernel-doc
@ 2026-11-16 10:38 Johan Hovold
  0 siblings, 0 replies; only message in thread
From: Johan Hovold @ 2026-11-16 10:38 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rafael J. Wysocki, Danilo Krummrich,
	Johan Hovold
  Cc: Andy Shevchenko, Daniel Scally, Heikki Krogerus, Sakari Ailus,
	Bartosz Golaszewski, linux-acpi, driver-core, linux-kernel

Child software nodes hold a reference to their parent via kobj->parent
so there was never any need to deregister them in any particular order.

Drop the misleading kernel-doc comments which suggest that deregistering
a parent node before a child could cause trouble.

Note that parent nodes still need to be registered before their children
or registration will fail.

Fixes: fc002f0f23e2 ("media: software_node: unregister software_nodes in reverse order")
Fixes: 0b8bf06f6719 ("device property: Sync descriptions of swnode array and group APIs")
Cc: Daniel Scally <djrscally@gmail.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/base/swnode.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/base/swnode.c b/drivers/base/swnode.c
index 8e12f518e13f..78e224539b02 100644
--- a/drivers/base/swnode.c
+++ b/drivers/base/swnode.c
@@ -954,14 +954,7 @@ EXPORT_SYMBOL_GPL(software_node_register_node_group);
  * software_node_unregister_node_group - Unregister a group of software nodes
  * @node_group: NULL terminated array of software node pointers to be unregistered
  *
- * Unregister multiple software nodes at once. If parent pointers are set up
- * in any of the software nodes then the array **must** be ordered such that
- * parents come before their children.
- *
- * NOTE: If you are uncertain whether the array is ordered such that
- * parents will be unregistered before their children, it is wiser to
- * remove the nodes individually, in the correct order (child before
- * parent).
+ * Unregister multiple software nodes at once.
  */
 void software_node_unregister_node_group(const struct software_node * const *node_group)
 {
-- 
2.56.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-16 10:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-16 10:38 [PATCH] software node: fix node group deregistration kernel-doc Johan Hovold

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