Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit adf61692 authored by Bard Liao's avatar Bard Liao Committed by Greg Kroah-Hartman
Browse files

Revert "device property: Keep secondary firmware node secondary by type"



commit 47f4469970d8861bc06d2d4d45ac8200ff07c693 upstream.

While commit d5dcce0c414f ("device property: Keep secondary firmware
node secondary by type") describes everything correct in its commit
message, the change it made does the opposite and original commit
c15e1bdda436 ("device property: Fix the secondary firmware node handling
in set_primary_fwnode()") was fully correct.

Revert the former one here and improve documentation in the next patch.

Fixes: d5dcce0c414f ("device property: Keep secondary firmware node secondary by type")
Signed-off-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: 5.10+ <stable@vger.kernel.org> # 5.10+
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 115db8c4
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -2357,7 +2357,7 @@ void set_primary_fwnode(struct device *dev, struct fwnode_handle *fwnode)
		if (fwnode_is_primary(fn)) {
		if (fwnode_is_primary(fn)) {
			dev->fwnode = fn->secondary;
			dev->fwnode = fn->secondary;
			if (!(parent && fn == parent->fwnode))
			if (!(parent && fn == parent->fwnode))
				fn->secondary = ERR_PTR(-ENODEV);
				fn->secondary = NULL;
		} else {
		} else {
			dev->fwnode = NULL;
			dev->fwnode = NULL;
		}
		}