Commit f6c1626e authored by Ryder Lee's avatar Ryder Lee Committed by Mark Brown

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: default avatarRyder Lee <ryder.lee@mediatek.com>
CC: Garlic Tseng <garlic.tseng@mediatek.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 57127d9b
...@@ -1496,14 +1496,12 @@ static int mt2701_afe_runtime_resume(struct device *dev) ...@@ -1496,14 +1496,12 @@ static int mt2701_afe_runtime_resume(struct device *dev)
static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev) static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
{ {
int ret, i;
unsigned int irq_id;
struct mtk_base_afe *afe; struct mtk_base_afe *afe;
struct mt2701_afe_private *afe_priv; struct mt2701_afe_private *afe_priv;
struct resource *res; struct resource *res;
struct device *dev; struct device *dev;
int i, irq_id, ret;
ret = 0;
afe = devm_kzalloc(&pdev->dev, sizeof(*afe), GFP_KERNEL); afe = devm_kzalloc(&pdev->dev, sizeof(*afe), GFP_KERNEL);
if (!afe) if (!afe)
return -ENOMEM; return -ENOMEM;
...@@ -1516,11 +1514,12 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev) ...@@ -1516,11 +1514,12 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
afe->dev = &pdev->dev; afe->dev = &pdev->dev;
dev = afe->dev; dev = afe->dev;
irq_id = platform_get_irq(pdev, 0); irq_id = platform_get_irq_byname(pdev, "asys");
if (!irq_id) { if (irq_id < 0) {
dev_err(dev, "%s no irq found\n", dev->of_node->name); dev_err(dev, "unable to get ASYS IRQ\n");
return -ENXIO; return irq_id;
} }
ret = devm_request_irq(dev, irq_id, mt2701_asys_isr, ret = devm_request_irq(dev, irq_id, mt2701_asys_isr,
IRQF_TRIGGER_NONE, "asys-isr", (void *)afe); IRQF_TRIGGER_NONE, "asys-isr", (void *)afe);
if (ret) { if (ret) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment