From patchwork Thu Dec 23 17:30:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lad Prabhakar X-Patchwork-Id: 12698566 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9445FC4332F for ; Thu, 23 Dec 2021 17:33:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IC81sGckATP+QphOap5X4bWDBfoXv4oq1LaIemU/idI=; b=dxgFtmMBdWFK+a +kPdK1cCHIQCXMx371PadMy5NBVZqNrcS2ysGUJDuYfndMgl7rTsyBQ4Qd68x02+ztIGxZv1duWvu 1EQOA9GPE7v/YqWvIMfqx+Kn2lDBRqhvwFYfBVnDZqJhVhE9lKa1OIoYTzTeVcz1s5lznWqL95ZqR y+shINGxnLPS9um0JLRHvU/ftnInISdByrnPBumXs9zASJPJW/V+DG69M2CN7HaAROV8q/pME/gHR xGxUM5w9RH/HYja2qgMDEPTkMfQ/Hpf2/vCjgFEyw5s1gjUhMpHgVUUvsmI+p1AWPvgsNxOlycAxF rXOadJIB8KWI9qoASxew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n0RxE-00DD2m-GQ; Thu, 23 Dec 2021 17:32:37 +0000 Received: from relmlor2.renesas.com ([210.160.252.172] helo=relmlie6.idc.renesas.com) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n0Rvv-00DCP7-77 for linux-arm-kernel@lists.infradead.org; Thu, 23 Dec 2021 17:31:16 +0000 X-IronPort-AV: E=Sophos;i="5.88,230,1635174000"; d="scan'208";a="104983923" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 24 Dec 2021 02:31:14 +0900 Received: from localhost.localdomain (unknown [10.226.36.204]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 659A740C4DAD; Fri, 24 Dec 2021 02:31:11 +0900 (JST) From: Lad Prabhakar To: linux-media@vger.kernel.org, Philipp Zabel , Mauro Carvalho Chehab , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: Hans Verkuil , Rob Herring , linux-kernel@vger.kernel.org, Prabhakar , linux-renesas-soc@vger.kernel.org, Lad Prabhakar , linux-arm-kernel@lists.infradead.org Subject: [PATCH 13/13] media: coda: Use platform_get_irq() to get the interrupt Date: Thu, 23 Dec 2021 17:30:14 +0000 Message-Id: <20211223173015.22251-14-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211223173015.22251-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20211223173015.22251-1-prabhakar.mahadev-lad.rj@bp.renesas.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211223_093115_396958_FFDAE8C3 X-CRM114-Status: GOOD ( 12.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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(). Signed-off-by: Lad Prabhakar --- drivers/media/platform/coda/imx-vdoa.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/media/platform/coda/imx-vdoa.c b/drivers/media/platform/coda/imx-vdoa.c index 00643f37b3e6..c70871bae193 100644 --- a/drivers/media/platform/coda/imx-vdoa.c +++ b/drivers/media/platform/coda/imx-vdoa.c @@ -284,7 +284,6 @@ EXPORT_SYMBOL(vdoa_context_configure); static int vdoa_probe(struct platform_device *pdev) { struct vdoa_data *vdoa; - struct resource *res; int ret; ret = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32)); @@ -309,10 +308,10 @@ static int vdoa_probe(struct platform_device *pdev) if (IS_ERR(vdoa->regs)) return PTR_ERR(vdoa->regs); - res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); - if (!res) - return -EINVAL; - ret = devm_request_threaded_irq(&pdev->dev, res->start, NULL, + ret = platform_get_irq(pdev, 0); + if (ret < 0) + return ret; + ret = devm_request_threaded_irq(&pdev->dev, ret, NULL, vdoa_irq_handler, IRQF_ONESHOT, "vdoa", vdoa); if (ret < 0) {