Commit 2efddd28 authored by AngeloGioacchino Del Regno's avatar AngeloGioacchino Del Regno Committed by Matthias Brugger

soc: mediatek: mtk-svs: Switch to platform_get_irq()

Instead of using irq_of_parse_and_map() to retrieve the interrupt from
devicetree, switch to platform_get_irq() instead: this function will
conveniently also write an error message in case the irq is not found.
Signed-off-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220726141653.177948-3-angelogioacchino.delregno@collabora.comSigned-off-by: default avatarMatthias Brugger <matthias.bgg@gmail.com>
parent 61b55d86
...@@ -2306,8 +2306,7 @@ static struct svs_platform *svs_platform_probe(struct platform_device *pdev) ...@@ -2306,8 +2306,7 @@ static struct svs_platform *svs_platform_probe(struct platform_device *pdev)
static int svs_probe(struct platform_device *pdev) static int svs_probe(struct platform_device *pdev)
{ {
struct svs_platform *svsp; struct svs_platform *svsp;
unsigned int svsp_irq; int svsp_irq, ret;
int ret;
svsp = svs_platform_probe(pdev); svsp = svs_platform_probe(pdev);
if (IS_ERR(svsp)) if (IS_ERR(svsp))
...@@ -2325,7 +2324,12 @@ static int svs_probe(struct platform_device *pdev) ...@@ -2325,7 +2324,12 @@ static int svs_probe(struct platform_device *pdev)
goto svs_probe_free_resource; goto svs_probe_free_resource;
} }
svsp_irq = irq_of_parse_and_map(svsp->dev->of_node, 0); svsp_irq = platform_get_irq(pdev, 0);
if (svsp_irq < 0) {
ret = svsp_irq;
goto svs_probe_free_resource;
}
ret = devm_request_threaded_irq(svsp->dev, svsp_irq, NULL, svs_isr, ret = devm_request_threaded_irq(svsp->dev, svsp_irq, NULL, svs_isr,
svsp->irqflags | IRQF_ONESHOT, svsp->irqflags | IRQF_ONESHOT,
svsp->name, svsp); svsp->name, svsp);
......
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