From: Rosen Penev <rosenp@gmail•com>
To: linux-i2c@vger•kernel.org
Cc: Jochen Friedrich <jochen@scram•de>,
Andi Shyti <andi.shyti@kernel•org>,
linuxppc-dev@lists•ozlabs.org (open list:FREESCALE I2C CPM
DRIVER), linux-kernel@vger•kernel.org (open list)
Subject: [PATCH] i2c: cpm: Use platform_get_irq() to retrieve interrupt
Date: Tue, 2 Jun 2026 17:54:55 -0700 [thread overview]
Message-ID: <20260603005455.226882-1-rosenp@gmail.com> (raw)
Replace irq_of_parse_and_map() with platform_get_irq() as recommended
for device-managed IRQ lookup. Properly propagate any errors returned
from platform_get_irq(). irq_of_parse_and_map() requires
ire_dispose_mapping(), which is missing.
Assisted-by: opencode:big-pickle
Signed-off-by: Rosen Penev <rosenp@gmail•com>
---
drivers/i2c/busses/i2c-cpm.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c
index 2cb6a233d313..23679c192edc 100644
--- a/drivers/i2c/busses/i2c-cpm.c
+++ b/drivers/i2c/busses/i2c-cpm.c
@@ -434,9 +434,9 @@ static int cpm_i2c_setup(struct cpm_i2c *cpm)
init_waitqueue_head(&cpm->i2c_wait);
- cpm->irq = irq_of_parse_and_map(ofdev->dev.of_node, 0);
- if (!cpm->irq)
- return -EINVAL;
+ cpm->irq = platform_get_irq(ofdev, 0);
+ if (cpm->irq < 0)
+ return cpm->irq;
/* Install interrupt handler. */
ret = request_irq(cpm->irq, cpm_i2c_interrupt, 0, "cpm_i2c",
--
2.54.0
next reply other threads:[~2026-06-03 0:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 0:54 Rosen Penev [this message]
2026-06-03 8:15 ` [PATCH] i2c: cpm: Use platform_get_irq() to retrieve interrupt Christophe Leroy (CS GROUP)
2026-06-03 9:38 ` Rosen Penev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260603005455.226882-1-rosenp@gmail.com \
--to=rosenp@gmail$(echo .)com \
--cc=andi.shyti@kernel$(echo .)org \
--cc=jochen@scram$(echo .)de \
--cc=linux-i2c@vger$(echo .)kernel.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox