[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191016143142.28854-1-geert+renesas@glider.be>
Date: Wed, 16 Oct 2019 16:31:42 +0200
From: Geert Uytterhoeven <geert+renesas@...der.be>
To: Rob Herring <robh+dt@...nel.org>,
Frank Rowand <frowand.list@...il.com>
Cc: Stephen Boyd <swboyd@...omium.org>, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
Geert Uytterhoeven <geert+renesas@...der.be>
Subject: [PATCH] of: unittest: Use platform_get_irq_optional() for non-existing interrupt
As platform_get_irq() now prints an error when the interrupt
does not exist, a scary warning may be printed for a non-existing
interrupt:
platform testcase-data:testcase-device2: IRQ index 0 not found
Fix this by calling platform_get_irq_optional() instead.
Fixes: 7723f4c5ecdb8d83 ("driver core: platform: Add an error message to platform_get_irq*()")
Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>
---
This is a fix for v5.4.
---
drivers/of/unittest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index 9efae29722588a35..34da22f8b0660989 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -1121,7 +1121,7 @@ static void __init of_unittest_platform_populate(void)
np = of_find_node_by_path("/testcase-data/testcase-device2");
pdev = of_find_device_by_node(np);
unittest(pdev, "device 2 creation failed\n");
- irq = platform_get_irq(pdev, 0);
+ irq = platform_get_irq_optional(pdev, 0);
unittest(irq < 0 && irq != -EPROBE_DEFER,
"device parsing error failed - %d\n", irq);
}
--
2.17.1
Powered by blists - more mailing lists