diff options
author | Ryder Lee <ryder.lee@mediatek.com> | 2017-08-18 09:28:50 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-08-18 12:35:42 +0100 |
commit | f6c1626e28f22115ded520300b56fa049c068f4f (patch) | |
tree | 8f6d438b86e75ee2f5d84de33e7585c14bf42ba9 /sound/soc/mediatek/mt2701 | |
parent | 57127d9b8bcbecaac9470f62361570939dde49fd (diff) | |
download | linux-f6c1626e28f22115ded520300b56fa049c068f4f.tar.bz2 |
ASoC: mediatek: switch to use platform_get_irq_byname()
Switch to use platform_get_irq_byname() so that binding can be agnostic
of the IRQ order.
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
CC: Garlic Tseng <garlic.tseng@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/mediatek/mt2701')
-rw-r--r-- | sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c index 10dcd69c5ffa..8fda182f849b 100644 --- a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c +++ b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c @@ -1496,14 +1496,12 @@ static int mt2701_afe_runtime_resume(struct device *dev) static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev) { - int ret, i; - unsigned int irq_id; struct mtk_base_afe *afe; struct mt2701_afe_private *afe_priv; struct resource *res; struct device *dev; + int i, irq_id, ret; - ret = 0; afe = devm_kzalloc(&pdev->dev, sizeof(*afe), GFP_KERNEL); if (!afe) return -ENOMEM; @@ -1516,11 +1514,12 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev) afe->dev = &pdev->dev; dev = afe->dev; - irq_id = platform_get_irq(pdev, 0); - if (!irq_id) { - dev_err(dev, "%s no irq found\n", dev->of_node->name); - return -ENXIO; + irq_id = platform_get_irq_byname(pdev, "asys"); + if (irq_id < 0) { + dev_err(dev, "unable to get ASYS IRQ\n"); + return irq_id; } + ret = devm_request_irq(dev, irq_id, mt2701_asys_isr, IRQF_TRIGGER_NONE, "asys-isr", (void *)afe); if (ret) { |