Commit 87e7f601 authored by Sakari Ailus's avatar Sakari Ailus Committed by Danilo Krummrich
Browse files

software node: Also support referencing non-constant software nodes



Fwnode references are be implemented differently if referenced node is a
software node. _Generic() is used to differentiate between the two cases
but only const software nodes were present in the selection. Also add
non-const software nodes.

Reported-by: default avatarKenneth Crudup <kenny@panix.com>
Closes: https://lore.kernel.org/all/af773b82-bef2-4209-baaf-526d4661b7fc@panix.com/


Fixes: d7cdbbc9 ("software node: allow referencing firmware nodes")
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Tested-By: default avatarKenneth R. Crudup <kenny@panix.com>
Tested-by: Mehdi Djait <mehdi.djait@linux.intel.com> # Dell XPS 9315
Reviewed-by: default avatarMehdi Djait <mehdi.djait@linux.intel.com>
Link: https://patch.msgid.link/20251219083638.2454138-1-sakari.ailus@linux.intel.com


Signed-off-by: default avatarDanilo Krummrich <dakr@kernel.org>
parent d412ff9e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -371,6 +371,7 @@ struct software_node_ref_args {
(const struct software_node_ref_args) {				\
	.swnode = _Generic(_ref_,				\
			   const struct software_node *: _ref_,	\
			   struct software_node *: _ref_,	\
			   default: NULL),			\
	.fwnode = _Generic(_ref_,				\
			   struct fwnode_handle *: _ref_,	\