diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2021-06-24 10:52:13 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-06-25 09:27:07 +0200 |
commit | 2bfa06b62e7c1f327a01f45f756136b7c7f802dd (patch) | |
tree | 4e2d6d03a73c1f7e8263a476fbea7c7c6f2719f6 /common | |
parent | 8a7dec93f98a26e944dcfffcc6a320922d5afa2f (diff) | |
download | barebox-2bfa06b62e7c1f327a01f45f756136b7c7f802dd.tar.gz barebox-2bfa06b62e7c1f327a01f45f756136b7c7f802dd.tar.xz |
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 <s.hauer@pengutronix.de>
Link: https://lore.barebox.org/20210624085223.14616-9-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r-- | common/firmware.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |