media: davinci: vpif: Use platform_get_irq_optional() to get the interrupt
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Thu, 13 Jan 2022 10:44:15 +0000 (11:44 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Mon, 7 Mar 2022 10:07:42 +0000 (11:07 +0100)
commit87137d55f3dcfc3e3664f072ba6bad7bf9bb1ff7
tree11380defe140f7d7687e8db8bf28964d148770c2
parente6a21a14106d9718aa4f8e115b1e474888eeba44
media: davinci: vpif: Use platform_get_irq_optional() to get the interrupt

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_optional().

While at it, propagate error code in case devm_request_irq() fails
instead of returning -EINVAL.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/davinci/vpif.c
drivers/media/platform/davinci/vpif_capture.c
drivers/media/platform/davinci/vpif_display.c