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 --- include/firmware.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/firmware.h b/include/firmware.h index 515bdcaf40..0ffea52840 100644 --- a/include/firmware.h +++ b/include/firmware.h @@ -14,6 +14,7 @@ struct firmware_handler { char *model; /* description for this device */ struct device_d *dev; void *priv; + struct device_node *device_node; /* called once to prepare the firmware's programming cycle */ int (*open)(struct firmware_handler*); /* called multiple times to program the firmware with the given data */ -- cgit v1.2.3