From: Meng Tang <tangmeng@uniontech.com>
To: perex@perex.cz, tiwai@suse.com
Cc: Meng Tang <tangmeng@uniontech.com>,
alsa-devel@alsa-project.org, broonie@kernel.org,
lgirdwood@gmail.com, linux-kernel@vger.kernel.org
Subject: [PATCH] sound/soc/amd: Use platform_get_irq_byname() to get the interrupt
Date: Fri, 25 Feb 2022 19:23:58 +0800 [thread overview]
Message-ID: <20220225112358.19403-1-tangmeng@uniontech.com> (raw)
platform_get_resource_byname(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.
In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq_byname().
Signed-off-by: Meng Tang <tangmeng@uniontech.com>
---
sound/soc/amd/acp/acp-renoir.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/sound/soc/amd/acp/acp-renoir.c b/sound/soc/amd/acp/acp-renoir.c
index d06ad5ce7fec..d4deac821300 100644
--- a/sound/soc/amd/acp/acp-renoir.c
+++ b/sound/soc/amd/acp/acp-renoir.c
@@ -265,13 +265,10 @@ static int renoir_audio_probe(struct platform_device *pdev)
if (!adata->acp_base)
return -ENOMEM;
- res = platform_get_resource_byname(pdev, IORESOURCE_IRQ, "acp_dai_irq");
- if (!res) {
- dev_err(&pdev->dev, "IORESOURCE_IRQ FAILED\n");
+ adata->i2s_irq = platform_get_irq_byname(pdev, "acp_dai_irq");
+ if (adata->i2s_irq < 0)
return -ENODEV;
- }
- adata->i2s_irq = res->start;
adata->dev = dev;
adata->dai_driver = acp_renoir_dai;
adata->num_dai = ARRAY_SIZE(acp_renoir_dai);
--
2.20.1
WARNING: multiple messages have this Message-ID (diff)
From: Meng Tang <tangmeng@uniontech.com>
To: perex@perex.cz, tiwai@suse.com
Cc: lgirdwood@gmail.com, broonie@kernel.org,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
Meng Tang <tangmeng@uniontech.com>
Subject: [PATCH] sound/soc/amd: Use platform_get_irq_byname() to get the interrupt
Date: Fri, 25 Feb 2022 19:23:58 +0800 [thread overview]
Message-ID: <20220225112358.19403-1-tangmeng@uniontech.com> (raw)
platform_get_resource_byname(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.
In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq_byname().
Signed-off-by: Meng Tang <tangmeng@uniontech.com>
---
sound/soc/amd/acp/acp-renoir.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/sound/soc/amd/acp/acp-renoir.c b/sound/soc/amd/acp/acp-renoir.c
index d06ad5ce7fec..d4deac821300 100644
--- a/sound/soc/amd/acp/acp-renoir.c
+++ b/sound/soc/amd/acp/acp-renoir.c
@@ -265,13 +265,10 @@ static int renoir_audio_probe(struct platform_device *pdev)
if (!adata->acp_base)
return -ENOMEM;
- res = platform_get_resource_byname(pdev, IORESOURCE_IRQ, "acp_dai_irq");
- if (!res) {
- dev_err(&pdev->dev, "IORESOURCE_IRQ FAILED\n");
+ adata->i2s_irq = platform_get_irq_byname(pdev, "acp_dai_irq");
+ if (adata->i2s_irq < 0)
return -ENODEV;
- }
- adata->i2s_irq = res->start;
adata->dev = dev;
adata->dai_driver = acp_renoir_dai;
adata->num_dai = ARRAY_SIZE(acp_renoir_dai);
--
2.20.1
next reply other threads:[~2022-02-25 13:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-25 11:23 Meng Tang [this message]
2022-02-25 11:23 ` [PATCH] sound/soc/amd: Use platform_get_irq_byname() to get the interrupt Meng Tang
2022-02-25 13:12 ` Mark Brown
2022-02-25 13:12 ` Mark Brown
2022-02-25 17:35 ` Mark Brown
2022-02-25 17:35 ` Mark Brown
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=20220225112358.19403-1-tangmeng@uniontech.com \
--to=tangmeng@uniontech.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.