From: <soha@lohu.info>
To: <gregkh@linuxfoundation.org>
Cc: <rafael@kernel.org>, <linux-kernel@vger.kernel.org>,
"'Wende Tan'" <twd2.me@gmail.com>
Subject: [PATCH] platform: use fwnode_irq_get_byname instead of of_irq_get_byname to get irq
Date: Sat, 1 Oct 2022 02:15:29 +0800 [thread overview]
Message-ID: <0E39B15006ADC205+02a601d8d4f8$a00a09e0$e01e1da0$@lohu.info> (raw)
From 02df97f4d814b9893eef2c2118b85d2b4b9d61ae Mon Sep 17 00:00:00 2001
From: Soha Jin <soha@lohu.info>
Date: Sat, 1 Oct 2022 00:26:04 +0800
Subject: [PATCH] platform: use fwnode_irq_get_byname instead of
of_irq_get_byname to get irq
Not only platform devices described by OF have named interrupts, but
devices described by ACPI also have named interrupts. The fwnode is an
abstraction to different standards, and using fwnode_irq_get_byname can
support more devices.
Signed-off-by: Soha Jin <soha@lohu.info>
Tested-by: Wende Tan <twd2.me@gmail.com>
---
drivers/base/platform.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 51bb22898..968f3d71e 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -441,8 +441,8 @@ static int __platform_get_irq_byname(struct platform_device *dev,
struct resource *r;
int ret;
- if (IS_ENABLED(CONFIG_OF_IRQ) && dev->dev.of_node) {
- ret = of_irq_get_byname(dev->dev.of_node, name);
+ if (!dev->dev.of_node || IS_ENABLED(CONFIG_OF_IRQ)) {
+ ret = fwnode_irq_get_byname(dev_fwnode(&dev->dev), name);
if (ret > 0 || ret == -EPROBE_DEFER)
return ret;
}
--
2.30.2
next reply other threads:[~2022-09-30 18:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-30 18:15 soha [this message]
2022-10-10 3:14 ` PING: " Soha Jin
2022-10-10 6:21 ` Greg KH
2022-10-10 7:07 ` Soha Jin
2022-11-10 17:55 ` 'Greg KH'
2022-11-10 18:01 ` Soha Jin
2022-11-10 17:55 ` Greg KH
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='0E39B15006ADC205+02a601d8d4f8$a00a09e0$e01e1da0$@lohu.info' \
--to=soha@lohu.info \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=twd2.me@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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
all inboxes | Powered by JetHome®