From 2bfa06b62e7c1f327a01f45f756136b7c7f802dd Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 24 Jun 2021 10:52:13 +0200 Subject: firmware: Fix device_node matching firmwaremgr_find_by_node() matches against the device node of the parent of the device associated to the handler. This is correct for the socfpga and zyncmp driver, but not for the altera_serial driver. Add a device_node argument to the handler which is set by the drivers to the correct device node and match against that. Signed-off-by: Sascha Hauer Link: https://lore.barebox.org/20210624085223.14616-9-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer --- common/firmware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/firmware.c') diff --git a/common/firmware.c b/common/firmware.c index 477dc1f13a..bb76a16050 100644 --- a/common/firmware.c +++ b/common/firmware.c @@ -70,7 +70,7 @@ struct firmware_mgr *firmwaremgr_find_by_node(struct device_node *np) struct firmware_mgr *mgr; list_for_each_entry(mgr, &firmwaremgr_list, list) - if (mgr->handler->dev->parent->device_node == np) + if (mgr->handler->device_node == np) return mgr; return NULL; -- cgit v1.2.3