]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
ASoC: bcm: Use platform_get_irq() to get the interrupt
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Tue, 21 Dec 2021 17:01:00 +0000 (17:01 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 21 Dec 2021 18:05:43 +0000 (18:05 +0000)
platform_get_resource(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().

While at it also drop "r_irq" member from struct bcm_i2s_priv as there
are no users of it.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20211221170100.27423-3-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/bcm/bcm63xx-i2s.h
sound/soc/bcm/bcm63xx-pcm-whistler.c

index edc328ba53d3b0a0e0624e8f385f6dc4063348b9..f30556bec89ed3625b4fcba9a7af5786443e57ae 100644 (file)
@@ -74,7 +74,6 @@
 
 struct bcm_i2s_priv {
        struct device *dev;
-       struct resource *r_irq;
        struct regmap *regmap_i2s;
        struct clk *i2s_clk;
        struct snd_pcm_substream        *play_substream;
index b5096f64c576e143a5bb6788d6f91dbdee760b72..2c600b017524f3530cf7a463e129caf15adf6b0d 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <linux/dma-mapping.h>
 #include <linux/io.h>
+#include <linux/irq.h>
 #include <linux/module.h>
 #include <sound/pcm_params.h>
 #include <linux/regmap.h>
@@ -387,14 +388,12 @@ int bcm63xx_soc_platform_probe(struct platform_device *pdev,
 {
        int ret;
 
-       i2s_priv->r_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-       if (!i2s_priv->r_irq) {
-               dev_err(&pdev->dev, "Unable to get register irq resource.\n");
-               return -ENODEV;
-       }
+       ret = platform_get_irq(pdev, 0);
+       if (ret < 0)
+               return ret;
 
-       ret = devm_request_irq(&pdev->dev, i2s_priv->r_irq->start, i2s_dma_isr,
-                       i2s_priv->r_irq->flags, "i2s_dma", (void *)i2s_priv);
+       ret = devm_request_irq(&pdev->dev, ret, i2s_dma_isr,
+                              irq_get_trigger_type(ret), "i2s_dma", (void *)i2s_priv);
        if (ret) {
                dev_err(&pdev->dev,
                        "i2s_init: failed to request interrupt.ret=%d\n", ret);