From patchwork Mon Dec 20 01:04:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prabhakar X-Patchwork-Id: 12686933 X-Patchwork-Delegate: geert@linux-m68k.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22E01C433FE for ; Mon, 20 Dec 2021 01:04:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237013AbhLTBEe (ORCPT ); Sun, 19 Dec 2021 20:04:34 -0500 Received: from relmlor2.renesas.com ([210.160.252.172]:1252 "EHLO relmlie6.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S237009AbhLTBEd (ORCPT ); Sun, 19 Dec 2021 20:04:33 -0500 X-IronPort-AV: E=Sophos;i="5.88,219,1635174000"; d="scan'208";a="104485861" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 20 Dec 2021 10:04:32 +0900 Received: from localhost.localdomain (unknown [10.226.36.204]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 713A0416745A; Mon, 20 Dec 2021 10:04:29 +0900 (JST) From: Lad Prabhakar To: Rob Herring , Greg Kroah-Hartman , linux-usb@vger.kernel.org, Peter Chen , Pawel Laszczak , Roger Quadros , Aswath Govindraju , Felipe Balbi , Rui Miguel Silva , Bin Liu Cc: linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Prabhakar , Lad Prabhakar Subject: [PATCH 1/6] usb: host: fotg210: Use platform_get_irq() to get the interrupt Date: Mon, 20 Dec 2021 01:04:06 +0000 Message-Id: <20211220010411.12075-2-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211220010411.12075-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20211220010411.12075-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.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 Reviewed-by: Geert Uytterhoeven --- drivers/usb/host/fotg210-hcd.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c index b590995a6b3e..7af17c8e069b 100644 --- a/drivers/usb/host/fotg210-hcd.c +++ b/drivers/usb/host/fotg210-hcd.c @@ -5576,14 +5576,9 @@ static int fotg210_hcd_probe(struct platform_device *pdev) pdev->dev.power.power_state = PMSG_ON; - res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); - if (!res) { - dev_err(dev, "Found HC with no IRQ. Check %s setup!\n", - dev_name(dev)); - return -ENODEV; - } - - irq = res->start; + irq = platform_get_irq(pdev, 0); + if (irq < 0) + return irq; hcd = usb_create_hcd(&fotg210_fotg210_hc_driver, dev, dev_name(dev));