From patchwork Wed Oct 16 14:27:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 11193449 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 84A081668 for ; Wed, 16 Oct 2019 14:27:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6FFD6207FF for ; Wed, 16 Oct 2019 14:27:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392455AbfJPO1n (ORCPT ); Wed, 16 Oct 2019 10:27:43 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:52576 "EHLO laurent.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726645AbfJPO1m (ORCPT ); Wed, 16 Oct 2019 10:27:42 -0400 Received: from ramsan ([84.194.98.4]) by laurent.telenet-ops.be with bizsmtp id EETg2100E05gfCL01ETgy4; Wed, 16 Oct 2019 16:27:41 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1iKkH6-0003md-O7; Wed, 16 Oct 2019 16:27:40 +0200 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1iKkH6-0007Ob-Mc; Wed, 16 Oct 2019 16:27:40 +0200 From: Geert Uytterhoeven To: Kishon Vijay Abraham I , Greg Kroah-Hartman Cc: Yoshihiro Shimoda , linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v2] phy: renesas: rcar-gen3-usb2: Use platform_get_irq_optional() for optional irq Date: Wed, 16 Oct 2019 16:27:33 +0200 Message-Id: <20191016142733.28387-1-geert+renesas@glider.be> X-Mailer: git-send-email 2.17.1 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org As platform_get_irq() now prints an error when the interrupt does not exist, a scary warning may be printed for an optional interrupt: phy_rcar_gen3_usb2 ee0a0200.usb-phy: IRQ index 0 not found Fix this by calling platform_get_irq_optional() instead. Fixes: 7723f4c5ecdb8d83 ("driver core: platform: Add an error message to platform_get_irq*()") Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Reviewed-by: Stephen Boyd Tested-by: Yoshihiro Shimoda --- v2: - Add Reviewed-by, Tested-by. This is a fix for v5.4. --- drivers/phy/renesas/phy-rcar-gen3-usb2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c index b7f6b132439521ea..49ec67d46ccc5a37 100644 --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c @@ -614,7 +614,7 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev) return PTR_ERR(channel->base); /* call request_irq for OTG */ - irq = platform_get_irq(pdev, 0); + irq = platform_get_irq_optional(pdev, 0); if (irq >= 0) { INIT_WORK(&channel->work, rcar_gen3_phy_usb2_work); irq = devm_request_irq(dev, irq, rcar_gen3_phy_usb2_irq,