summaryrefslogtreecommitdiffstats
path: root/drivers/of/property.c
diff options
context:
space:
mode:
authorSaravana Kannan <saravanak@google.com>2021-02-08 17:04:38 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-02-09 14:27:49 +0100
commitf265f06af1948c90007c78fe9f2fa93d6cea8800 (patch)
treeca1c632d580577958209627ebf71639771ed0296 /drivers/of/property.c
parentced2af419528611bac9ffebb8e51aa59a8e9fca3 (diff)
downloadlinux-f265f06af1948c90007c78fe9f2fa93d6cea8800.tar.bz2
of: property: Fix fw_devlink handling of interrupts/interrupts-extended
Commit 4104ca776ba3 ("of: property: Add fw_devlink support for interrupts") was not taking interrupt-map into account. Fix that. Fixes: 4104ca776ba3 ("of: property: Add fw_devlink support for interrupts") Reported-by: Marek Szyprowski <m.szyprowski@samsung.com> Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Saravana Kannan <saravanak@google.com> Link: https://lore.kernel.org/r/20210209010439.3529036-1-saravanak@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/of/property.c')
-rw-r--r--drivers/of/property.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/of/property.c b/drivers/of/property.c
index 6287c6d60bb7..8b52160adcc3 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -1245,8 +1245,6 @@ DEFINE_SIMPLE_PROP(dmas, "dmas", "#dma-cells")
DEFINE_SIMPLE_PROP(power_domains, "power-domains", "#power-domain-cells")
DEFINE_SIMPLE_PROP(hwlocks, "hwlocks", "#hwlock-cells")
DEFINE_SIMPLE_PROP(extcon, "extcon", NULL)
-DEFINE_SIMPLE_PROP(interrupts_extended, "interrupts-extended",
- "#interrupt-cells")
DEFINE_SIMPLE_PROP(nvmem_cells, "nvmem-cells", NULL)
DEFINE_SIMPLE_PROP(phys, "phys", "#phy-cells")
DEFINE_SIMPLE_PROP(wakeup_parent, "wakeup-parent", NULL)
@@ -1297,10 +1295,13 @@ static struct device_node *parse_gpio_compat(struct device_node *np,
static struct device_node *parse_interrupts(struct device_node *np,
const char *prop_name, int index)
{
- if (strcmp(prop_name, "interrupts") || index)
+ struct of_phandle_args sup_args;
+
+ if (strcmp(prop_name, "interrupts") &&
+ strcmp(prop_name, "interrupts-extended"))
return NULL;
- return of_irq_find_parent(np);
+ return of_irq_parse_one(np, index, &sup_args) ? NULL : sup_args.np;
}
static const struct supplier_bindings of_supplier_bindings[] = {
@@ -1315,7 +1316,6 @@ static const struct supplier_bindings of_supplier_bindings[] = {
{ .parse_prop = parse_power_domains, },
{ .parse_prop = parse_hwlocks, },
{ .parse_prop = parse_extcon, },
- { .parse_prop = parse_interrupts_extended, },
{ .parse_prop = parse_nvmem_cells, },
{ .parse_prop = parse_phys, },
{ .parse_prop = parse_wakeup_parent, },