media: mediatek: vcodec: Drop platform_get_resource(IORESOURCE_IRQ)

Commit a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource
from DT core") removed support for calling platform_get_resource(...,
IORESOURCE_IRQ, ...) on DT-based drivers, but the probe() function of
mtk-vcodec's encoder was still making use of it. This caused the encoder
driver to fail probe.

Since the platform_get_resource() call was only being used to check for
the presence of the interrupt (its returned resource wasn't even used)
and platform_get_irq() was already being used to get the IRQ, simply
drop the use of platform_get_resource(IORESOURCE_IRQ) and handle the
failure of platform_get_irq(), to get the driver probing again.

[hverkuil: drop unused struct resource *res]

Fixes: a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource from DT core")
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>

authored by Nícolas F. R. A. Prado and committed by Mauro Carvalho Chehab a2d2e593 37238699

Changed files
+3 -6
drivers
media
platform
mediatek
+3 -6
drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c
··· 228 228 { 229 229 struct mtk_vcodec_dev *dev; 230 230 struct video_device *vfd_enc; 231 - struct resource *res; 232 231 phandle rproc_phandle; 233 232 enum mtk_vcodec_fw_type fw_type; 234 233 int ret; ··· 271 272 goto err_res; 272 273 } 273 274 274 - res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); 275 - if (res == NULL) { 276 - dev_err(&pdev->dev, "failed to get irq resource"); 277 - ret = -ENOENT; 275 + dev->enc_irq = platform_get_irq(pdev, 0); 276 + if (dev->enc_irq < 0) { 277 + ret = dev->enc_irq; 278 278 goto err_res; 279 279 } 280 280 281 - dev->enc_irq = platform_get_irq(pdev, 0); 282 281 irq_set_status_flags(dev->enc_irq, IRQ_NOAUTOEN); 283 282 ret = devm_request_irq(&pdev->dev, dev->enc_irq, 284 283 mtk_vcodec_enc_irq_handler,