[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <fc9b3afaf8826fd437ba91397eb7fa231db2c05c.1700449792.git.zhoubinbin@loongson.cn>
Date: Mon, 20 Nov 2023 17:06:48 +0800
From: Binbin Zhou <zhoubinbin@...ngson.cn>
To: Binbin Zhou <zhoubb.aaron@...il.com>,
Huacai Chen <chenhuacai@...ngson.cn>,
Thomas Gleixner <tglx@...utronix.de>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>
Cc: Huacai Chen <chenhuacai@...nel.org>,
loongson-kernel@...ts.loongnix.cn, devicetree@...r.kernel.org,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Jiaxun Yang <jiaxun.yang@...goat.com>,
linux-mips@...r.kernel.org, lvjianmin@...ngson.cn,
WANG Xuerui <git@...0n.name>, loongarch@...ts.linux.dev,
linux-kernel@...r.kernel.org, Binbin Zhou <zhoubinbin@...ngson.cn>
Subject: [PATCH v5 4/5] irqchip/loongson-liointc: Fix 'loongson,parent_int_map' parse
In keeping with naming standards, 'loongson,parent_int_map' is renamed
to 'loongson,parent-int-map'. But for the driver, we need to make sure
that both forms can be parsed.
Signed-off-by: Binbin Zhou <zhoubinbin@...ngson.cn>
Acked-by: Jiaxun Yang <jiaxun.yang@...goat.com>
Reviewed-by: Huacai Chen <chenhuacai@...ngson.cn>
---
drivers/irqchip/irq-loongson-liointc.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-loongson-liointc.c b/drivers/irqchip/irq-loongson-liointc.c
index e4b33aed1c97..add2e0a955b8 100644
--- a/drivers/irqchip/irq-loongson-liointc.c
+++ b/drivers/irqchip/irq-loongson-liointc.c
@@ -330,6 +330,7 @@ static int __init liointc_of_init(struct device_node *node,
bool have_parent = FALSE;
int sz, i, index, revision, err = 0;
struct resource res;
+ const char *prop_name = "loongson,parent-int-map";
if (!of_device_is_compatible(node, "loongson,liointc-2.0")) {
index = 0;
@@ -350,8 +351,12 @@ static int __init liointc_of_init(struct device_node *node,
if (!have_parent)
return -ENODEV;
+ if (!of_find_property(node, prop_name, &i))
+ /* Fallback to 'loongson,parent_int_map'. */
+ prop_name = "loongson,parent_int_map";
+
sz = of_property_read_variable_u32_array(node,
- "loongson,parent_int_map",
+ prop_name,
&parent_int_map[0],
LIOINTC_NUM_PARENT,
LIOINTC_NUM_PARENT);
--
2.39.3
Powered by blists - more mailing lists