diff options
author | Rob Herring (Arm) <robh@kernel.org> | 2024-05-29 14:59:20 -0500 |
---|---|---|
committer | Rob Herring (Arm) <robh@kernel.org> | 2024-05-30 19:43:19 -0500 |
commit | 935df1bd40d43c4ee91838c42a20e9af751885cc (patch) | |
tree | 647dcc875b485e3e553f5a9b44c1730d60845910 /drivers/of/of_private.h | |
parent | 321e4fa68ce15660ec578bdec5cc9607635087cf (diff) |
of/irq: Factor out parsing of interrupt-map parent phandle+args from of_irq_parse_raw()
Factor out the parsing of interrupt-map interrupt parent phandle and its
arg cells to a separate function, of_irq_parse_imap_parent(), so that it
can be used in other parsing scenarios (e.g. fw_devlink).
There was a refcount leak on non-matching entries when iterating thru
"interrupt-map" which is fixed.
Tested-by: Marc Zyngier <maz@kernel.org>
Tested-by: Anup Patel <apatel@ventanamicro.com>
Link: https://lore.kernel.org/r/20240529-dt-interrupt-map-fix-v2-1-ef86dc5bcd2a@kernel.org
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Diffstat (limited to 'drivers/of/of_private.h')
-rw-r--r-- | drivers/of/of_private.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/of/of_private.h b/drivers/of/of_private.h index 94fc0aa07af9..04aa2a91f851 100644 --- a/drivers/of/of_private.h +++ b/drivers/of/of_private.h @@ -159,6 +159,9 @@ extern void __of_sysfs_remove_bin_file(struct device_node *np, extern int of_bus_n_addr_cells(struct device_node *np); extern int of_bus_n_size_cells(struct device_node *np); +const __be32 *of_irq_parse_imap_parent(const __be32 *imap, int len, + struct of_phandle_args *out_irq); + struct bus_dma_region; #if defined(CONFIG_OF_ADDRESS) && defined(CONFIG_HAS_DMA) int of_dma_get_range(struct device_node *np, |