public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] device property: Allow secondary lookup in" failed to apply to 5.10-stable tree
@ 2026-03-17 11:35 gregkh
  2026-03-17 17:19 ` [PATCH 5.10.y 1/8] device property: Add fwnode_is_ancestor_of() and fwnode_get_next_parent_dev() Sasha Levin
  0 siblings, 1 reply; 9+ messages in thread
From: gregkh @ 2026-03-17 11:35 UTC (permalink / raw)
  To: andriy.shevchenko, dakr, rafael, sakari.ailus; +Cc: stable


The patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y
git checkout FETCH_HEAD
git cherry-pick -x 2692c614f8f05929d692b3dbfd3faef1f00fbaf0
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2026031703-caravan-bladder-c63a@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^..

Possible dependencies:



thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 2692c614f8f05929d692b3dbfd3faef1f00fbaf0 Mon Sep 17 00:00:00 2001
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: Tue, 10 Feb 2026 14:58:22 +0100
Subject: [PATCH] device property: Allow secondary lookup in
 fwnode_get_next_child_node()

When device_get_child_node_count() got split to the fwnode and device
respective APIs, the fwnode didn't inherit the ability to traverse over
the secondary fwnode. Hence any user, that switches from device to fwnode
API misses this feature. In particular, this was revealed by the commit
1490cbb9dbfd ("device property: Split fwnode_get_child_node_count()")
that effectively broke the GPIO enumeration on Intel Galileo boards.
Fix this by moving the secondary lookup from device to fwnode API.

Note, in general no device_*() API should go into the depth of the fwnode
implementation.

Fixes: 114dbb4fa7c4 ("drivers property: When no children in primary, try secondary")
Cc: stable@vger.kernel.org
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Rafael J. Wysocki (Intel) <rafael@kernel.org>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Link: https://patch.msgid.link/20260210135822.47335-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>

diff --git a/drivers/base/property.c b/drivers/base/property.c
index 6a63860579dd..8d9a34be57fb 100644
--- a/drivers/base/property.c
+++ b/drivers/base/property.c
@@ -797,7 +797,18 @@ struct fwnode_handle *
 fwnode_get_next_child_node(const struct fwnode_handle *fwnode,
 			   struct fwnode_handle *child)
 {
-	return fwnode_call_ptr_op(fwnode, get_next_child_node, child);
+	struct fwnode_handle *next;
+
+	if (IS_ERR_OR_NULL(fwnode))
+		return NULL;
+
+	/* Try to find a child in primary fwnode */
+	next = fwnode_call_ptr_op(fwnode, get_next_child_node, child);
+	if (next)
+		return next;
+
+	/* When no more children in primary, continue with secondary */
+	return fwnode_call_ptr_op(fwnode->secondary, get_next_child_node, child);
 }
 EXPORT_SYMBOL_GPL(fwnode_get_next_child_node);
 
@@ -841,19 +852,7 @@ EXPORT_SYMBOL_GPL(fwnode_get_next_available_child_node);
 struct fwnode_handle *device_get_next_child_node(const struct device *dev,
 						 struct fwnode_handle *child)
 {
-	const struct fwnode_handle *fwnode = dev_fwnode(dev);
-	struct fwnode_handle *next;
-
-	if (IS_ERR_OR_NULL(fwnode))
-		return NULL;
-
-	/* Try to find a child in primary fwnode */
-	next = fwnode_get_next_child_node(fwnode, child);
-	if (next)
-		return next;
-
-	/* When no more children in primary, continue with secondary */
-	return fwnode_get_next_child_node(fwnode->secondary, child);
+	return fwnode_get_next_child_node(dev_fwnode(dev), child);
 }
 EXPORT_SYMBOL_GPL(device_get_next_child_node);
 


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-03-17 17:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-17 11:35 FAILED: patch "[PATCH] device property: Allow secondary lookup in" failed to apply to 5.10-stable tree gregkh
2026-03-17 17:19 ` [PATCH 5.10.y 1/8] device property: Add fwnode_is_ancestor_of() and fwnode_get_next_parent_dev() Sasha Levin
2026-03-17 17:19   ` [PATCH 5.10.y 2/8] media: device property: Return true in fwnode_device_is_available for NULL ops Sasha Levin
2026-03-17 17:19   ` [PATCH 5.10.y 3/8] device property: Retrieve fwnode from of_node via accessor Sasha Levin
2026-03-17 17:19   ` [PATCH 5.10.y 4/8] device property: Unify access to of_node Sasha Levin
2026-03-17 17:19   ` [PATCH 5.10.y 5/8] device property: Check fwnode->secondary in fwnode_graph_get_next_endpoint() Sasha Levin
2026-03-17 17:19   ` [PATCH 5.10.y 6/8] device property: Check fwnode->secondary when finding properties Sasha Levin
2026-03-17 17:19   ` [PATCH 5.10.y 7/8] device property: Allow error pointer to be passed to fwnode APIs Sasha Levin
2026-03-17 17:19   ` [PATCH 5.10.y 8/8] device property: Allow secondary lookup in fwnode_get_next_child_node() Sasha Levin

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