Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp795245iog; Fri, 17 Jun 2022 13:57:29 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vvDiHyF7lFuL6URy0beXiGhOBJg6I3v1X2mhX8/ek1ZYMvnR2+Sz7ScIuRZ/cL5nuPUBtz X-Received: by 2002:a63:a749:0:b0:40c:57e0:86c0 with SMTP id w9-20020a63a749000000b0040c57e086c0mr3550368pgo.265.1655499449093; Fri, 17 Jun 2022 13:57:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655499449; cv=none; d=google.com; s=arc-20160816; b=nOmmSG7tp7JCK9qPAFbYsiocr2dfkYUOn4qosWwl44wZR56GrSf34nomU5rHQ96v1F T5x5sKpjtFszNk8tm86RPR9Z/cGhiu+iIdQid7VZY98GwE18QH2dpfsy24R3FMV8q/5y b3Jdk5ytZ952f1vQKARUdHbj76mSkH1FUPSfk3WxUEkHDt+ttLLtNPEe4R+w/iTCuFhi bergMCC20Tl6IkviMvltJKsSLssAVGGM2d7EpXJ1yEm9D6I3rOa2a8qRBntaH6rLDzVF AipG3UVF3Y8zwFNH/J9VqygOuQqIG/0hxifAZuegD6iDtMNyUbPr4qsYJxn4HwP9qYoi wOrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Jek501v3Ydyv1uYKUNexRz+HOp+Tdh4kjY//8dd7V20=; b=KLxJQn6K0Wc60x5ws/xKMrLferF7sdxwKpmW+ZUtaDmUmyHfb1+7WkyvHbxB/M15dy OPLZoh8GMASbHeDNT4GUQYrqm98YysSS9c2YTN/FI4iiV1tg6ZOCFODfPq5iZ/ZDlbNP 1QGVNCWzl04rxpPXcCjojrjyIfp16sUmODe5IKMJkSWq/fPYTj6RsWLadl3dN8RQ1Iv0 l743zi7hsMD+wlXqbN28N7pV0H1BNDJh5Iq04JYnMGC7EBEKiwAautG3Aj9oY2jLshyR PvuuNFmhTtwEJKyRa5eOX3O3xQAMHQZ8ch3z4OX6aY0yKp856KuaTG8M34YiOVVvDL2O g51Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=XZ1pKxO8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n5-20020a170903110500b00163f3e72aecsi6124194plh.318.2022.06.17.13.57.17; Fri, 17 Jun 2022 13:57:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=XZ1pKxO8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1383571AbiFQUmK (ORCPT + 99 others); Fri, 17 Jun 2022 16:42:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1383548AbiFQUl6 (ORCPT ); Fri, 17 Jun 2022 16:41:58 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0CC45C874; Fri, 17 Jun 2022 13:39:26 -0700 (PDT) Received: from notapiano.myfiosgateway.com (pool-98-113-53-228.nycmny.fios.verizon.net [98.113.53.228]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madras.collabora.co.uk (Postfix) with ESMTPSA id CABF76601797; Fri, 17 Jun 2022 21:39:10 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1655498352; bh=unOJLRCDw7ZgTYa/8lyD2J+JxtKXBgGo6Z3sHYVsN/8=; h=From:To:Cc:Subject:Date:From; b=XZ1pKxO8HcDYK1nHIJdH1GIT8ak5uIfYf37+VzFupVfJsNIC95X6RrjzhvnwWv+eL 1V5kGuBt0rMJU8N2FslzzJj+IQzzcxbeUyGz02gMuwdbzAy/NxNEfhX03BHTTPo0kd iEZ7/eVobt29a+zVlMRMZZGwQD28ZeNLli4JaqRnpGXNvnuGYMLVfJlwQrzQ5PKhRU PKOjMLScWEeqGZtCNW7JB+kJceemCwEfvLAwwlBN44YgrgZNRBE/3lHsmhMlva7QJQ stYS3wC3VTM9qo9O3Fe2IGrp3nZtZC0APwZiZMHs0Y2+rnon+bgd5PJV82PG/gF9Ie Umha8AdstBUlw== From: =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= To: Hans Verkuil Cc: AngeloGioacchino Del Regno , kernel@collabora.com, =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= , Andrew-CT Chen , Lad Prabhakar , Marc Zyngier , Matthias Brugger , Mauro Carvalho Chehab , Rob Herring , Tiffany Lin , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH] media: mediatek: vcodec: Drop platform_get_resource(IORESOURCE_IRQ) Date: Fri, 17 Jun 2022 16:39:06 -0400 Message-Id: <20220617203906.2422868-1-nfraprado@collabora.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Fixes: a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource from DT core") Signed-off-by: NĂ­colas F. R. A. Prado --- Tested on mt8192-asurada-spherion. .../media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c index 95e8c29ccc65..b91c27e79796 100644 --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c @@ -272,14 +272,12 @@ static int mtk_vcodec_probe(struct platform_device *pdev) goto err_res; } - res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); - if (res == NULL) { - dev_err(&pdev->dev, "failed to get irq resource"); - ret = -ENOENT; + dev->enc_irq = platform_get_irq(pdev, 0); + if (dev->enc_irq < 0) { + ret = dev->enc_irq; goto err_res; } - dev->enc_irq = platform_get_irq(pdev, 0); irq_set_status_flags(dev->enc_irq, IRQ_NOAUTOEN); ret = devm_request_irq(&pdev->dev, dev->enc_irq, mtk_vcodec_enc_irq_handler, -- 2.36.1