From patchwork Thu Dec 23 17:30:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prabhakar X-Patchwork-Id: 12698539 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 29B0BC433F5 for ; Thu, 23 Dec 2021 17:33:11 +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=f05iNJ07oYMxI56bnRlkOVv96opyz8rjEoSmOlwmV3Y=; b=4Y5zxG+YPp0VyK B5MAisWY6DCjguCAibLZddqswtKi3u26OYDTUPfRaj+qdQN2c0Py7rPj2pFW3qng4KOGo54dfu5nj vxYY2VSlVsWhEZu9Y8mr2jpv7S8WCYhUMSojiE5vJJ3IkZjIFcWp16oUga0bA6jk/mcQmf21IYJf1 rvxs8RFMbnPmJMY7PKppbhtm21vIXnP/yMuK5lVTSxaEokMYiwzrgKQYtz6KAixD0UCV/7c77UL4+ vpLpz1PVnr6JzVJ0odLYFedDk+yHXieMb8b10otDjsJGDzn+bPCgtN+X0jbKRAw1EpJcaobBgp4+R ydJGJ7fuxHSAkUdjVmeg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n0Rwc-00DCgv-BX; Thu, 23 Dec 2021 17:31:58 +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 1n0Rvn-00DCH1-21 for linux-arm-kernel@lists.infradead.org; Thu, 23 Dec 2021 17:31:08 +0000 X-IronPort-AV: E=Sophos;i="5.88,230,1635174000"; d="scan'208";a="104983913" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 24 Dec 2021 02:31:06 +0900 Received: from localhost.localdomain (unknown [10.226.36.204]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 9ADFD40C4DB3; Fri, 24 Dec 2021 02:31:04 +0900 (JST) From: Lad Prabhakar To: linux-media@vger.kernel.org, =?utf-8?q?=C5=81ukasz_Stelmach?= , Mauro Carvalho Chehab 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 11/13] media: s5p-g2d: Use platform_get_irq() to get the interrupt Date: Thu, 23 Dec 2021 17:30:12 +0000 Message-Id: <20211223173015.22251-12-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_093107_243370_C7D51D84 X-CRM114-Status: GOOD ( 12.36 ) 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/s5p-g2d/g2d.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/media/platform/s5p-g2d/g2d.c b/drivers/media/platform/s5p-g2d/g2d.c index fa0bb31bd2b9..dd8864779a7c 100644 --- a/drivers/media/platform/s5p-g2d/g2d.c +++ b/drivers/media/platform/s5p-g2d/g2d.c @@ -623,7 +623,6 @@ static int g2d_probe(struct platform_device *pdev) { struct g2d_dev *dev; struct video_device *vfd; - struct resource *res; const struct of_device_id *of_id; int ret = 0; @@ -664,14 +663,11 @@ static int g2d_probe(struct platform_device *pdev) goto put_clk_gate; } - res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); - if (!res) { - dev_err(&pdev->dev, "failed to find IRQ\n"); - ret = -ENXIO; + ret = platform_get_irq(pdev, 0); + if (ret < 0) goto unprep_clk_gate; - } - dev->irq = res->start; + dev->irq = ret; ret = devm_request_irq(&pdev->dev, dev->irq, g2d_isr, 0, pdev->name, dev);