* [PATCH 0/5] Correctly handle plaform_get_irq()'s result in the i2C drivers
@ 2021-06-23 20:48 Sergey Shtylyov
2021-06-23 21:01 ` [PATCH 4/5] i2c: s3c2410: fix IRQ check Sergey Shtylyov
0 siblings, 1 reply; 2+ messages in thread
From: Sergey Shtylyov @ 2021-06-23 20:48 UTC (permalink / raw)
To: linux-i2c
Cc: Qii Wang, Matthias Brugger, linux-arm-kernel, linux-mediatek,
linux-samsung-soc
Here are 5 patches against the 'i2c/for-current' branch of the Jens Axboe's 'linux-block.git' repo.
The affected drivers call platform_get_irq() but mis-interprete its result -- they consider
IRQ0 as error and (sometimes) the real error codes as valid IRQs... :-/
[1/5] i2c: hix5hd2: fix IRQ check
[2/5] i2c: mt65xx: fix IRQ check
[3/5] i2c: pmcmsp: fix-IRQ-check
[4/5] i2c: s3c2410: fix IRQ check
[5/5] i2c: xlp9xx: fix main IRQ check
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 4/5] i2c: s3c2410: fix IRQ check
2021-06-23 20:48 [PATCH 0/5] Correctly handle plaform_get_irq()'s result in the i2C drivers Sergey Shtylyov
@ 2021-06-23 21:01 ` Sergey Shtylyov
0 siblings, 0 replies; 2+ messages in thread
From: Sergey Shtylyov @ 2021-06-23 21:01 UTC (permalink / raw)
To: linux-i2c; +Cc: linux-samsung-soc
Iff platform_get_irq() returns 0, the driver's probe() method will return 0
early (as if the method's call was successful). Let's consider IRQ0 valid
for simplicity -- devm_request_irq() can always override that decision...
Fixes: 2bbd681ba2b ("i2c-s3c2410: Change IRQ to be plain integer.")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
drivers/i2c/busses/i2c-s3c2410.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux/drivers/i2c/busses/i2c-s3c2410.c
===================================================================
--- linux.orig/drivers/i2c/busses/i2c-s3c2410.c
+++ linux/drivers/i2c/busses/i2c-s3c2410.c
@@ -1137,7 +1137,7 @@ static int s3c24xx_i2c_probe(struct plat
*/
if (!(i2c->quirks & QUIRK_POLL)) {
i2c->irq = ret = platform_get_irq(pdev, 0);
- if (ret <= 0) {
+ if (ret < 0) {
dev_err(&pdev->dev, "cannot find IRQ\n");
clk_unprepare(i2c->clk);
return ret;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-23 21:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-23 20:48 [PATCH 0/5] Correctly handle plaform_get_irq()'s result in the i2C drivers Sergey Shtylyov
2021-06-23 21:01 ` [PATCH 4/5] i2c: s3c2410: fix IRQ check Sergey Shtylyov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).