[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <173693257602.31546.8894556818847637622.tip-bot2@tip-bot2>
Date: Wed, 15 Jan 2025 09:16:16 -0000
From: "tip-bot2 for Krzysztof Kozlowski" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>, x86@...nel.org,
linux-kernel@...r.kernel.org, maz@...nel.org
Subject:
[tip: irq/core] irqchip: keystone: Use syscon_regmap_lookup_by_phandle_args
The following commit has been merged into the irq/core branch of tip:
Commit-ID: 877c76dbb98b164f58d328c246ad33ec2db1030f
Gitweb: https://git.kernel.org/tip/877c76dbb98b164f58d328c246ad33ec2db1030f
Author: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
AuthorDate: Sat, 11 Jan 2025 19:54:14 +01:00
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Wed, 15 Jan 2025 09:47:46 +01:00
irqchip: keystone: Use syscon_regmap_lookup_by_phandle_args
Use syscon_regmap_lookup_by_phandle_args() which is a wrapper over
syscon_regmap_lookup_by_phandle() combined with getting the syscon
argument. Except simpler code this annotates within one line that given
phandle has arguments, so grepping for code would be easier.
There is also no real benefit in printing errors on missing syscon
argument, because this is done just too late: runtime check on
static/build-time data. Dtschema and Devicetree bindings offer the
static/build-time check for this already.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Link: https://lore.kernel.org/all/20250111185414.183971-1-krzysztof.kozlowski@linaro.org
---
drivers/irqchip/irq-keystone.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/drivers/irqchip/irq-keystone.c b/drivers/irqchip/irq-keystone.c
index 808c781..37e1a03 100644
--- a/drivers/irqchip/irq-keystone.c
+++ b/drivers/irqchip/irq-keystone.c
@@ -141,18 +141,11 @@ static int keystone_irq_probe(struct platform_device *pdev)
if (!kirq)
return -ENOMEM;
- kirq->devctrl_regs =
- syscon_regmap_lookup_by_phandle(np, "ti,syscon-dev");
+ kirq->devctrl_regs = syscon_regmap_lookup_by_phandle_args(np, "ti,syscon-dev",
+ 1, &kirq->devctrl_offset);
if (IS_ERR(kirq->devctrl_regs))
return PTR_ERR(kirq->devctrl_regs);
- ret = of_property_read_u32_index(np, "ti,syscon-dev", 1,
- &kirq->devctrl_offset);
- if (ret) {
- dev_err(dev, "couldn't read the devctrl_offset offset!\n");
- return ret;
- }
-
kirq->irq = platform_get_irq(pdev, 0);
if (kirq->irq < 0)
return kirq->irq;
Powered by blists - more mailing lists