Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp8653933ybn; Tue, 1 Oct 2019 11:10:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqxVX7zx6kEuCE504YETjSoHxnMIfJ+J49W1aBhz2L9bFg6erFVDRKcaPs4tMn/h3bzKe6qI X-Received: by 2002:a17:906:7e56:: with SMTP id z22mr24309692ejr.294.1569953431582; Tue, 01 Oct 2019 11:10:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569953431; cv=none; d=google.com; s=arc-20160816; b=KyZk2bQR7whfe5Yt8nFbOYiGr6o326WCW5y1O8/bxTfTqBBlCrTx3gma6vOTDLjCQs WLeruH22KRXwK+U+aO4XQ2SXkeOSYaxN00yB4fAB1D4NL1Zy6rmOA/hzFc2cPTAYKAMA Z09O8j+E8nAgFSy7ZoRrR532PZ6NzOT4QlpSLJY1wujuND/Cfk1JqDdaIfbI8x6W0hrh WqjioqWG3c0Ktpj/22A1+F2XsUZg3TfE86eo9ro5WzmHaszj+nCzqzKtAqUmNsp8otEt v6RWaJwS+X/BwEWM8AcP0npk4HeDbp7tofGXujiEHDoIHQTbg7m8vwugOYA220wPM0vr g7WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=oLfII0bEROppE4iRHrkAYTWpARqkbk/4QKsiiuBKmAk=; b=Qjitagln3nTpV9Ij2UEDR31Lb4w5oyWJ0F+rBpRCfUVEesr72fnri3Wc4tXSJ++yVB wDcopp7lPvTjP9NwhZiFNauFLkGY0xqN1d8/Z8e25/63fmV/hke2GUrppxUGs22RYuL2 1WI4awYCykobvXq3X1BR37lKFIGD3ZTNJFMnMjr09ew+QlyyyeXzVH6T542LHgSrxAha ZHF1GjmW6D3bUfpiv3mEccpYrXTJ20fu6cmHOxBBNrwBYqNLr501eJaTREn+A0I1993x 8+hFyekSlY8w9S09qJ+vu6S/53s6mN6ZxkgQodI/Ddi9E+FfQLlFWGyIxvrdeumbs/w0 9/BQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n26si9253135eja.273.2019.10.01.11.10.05; Tue, 01 Oct 2019 11:10:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731940AbfJASIg (ORCPT + 99 others); Tue, 1 Oct 2019 14:08:36 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:54090 "EHLO baptiste.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729420AbfJASIg (ORCPT ); Tue, 1 Oct 2019 14:08:36 -0400 Received: from ramsan ([84.194.98.4]) by baptiste.telenet-ops.be with bizsmtp id 8J8b2100305gfCL01J8bCc; Tue, 01 Oct 2019 20:08:35 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1iFMZf-0008LA-0r; Tue, 01 Oct 2019 20:08:35 +0200 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1iFMZe-0000JZ-Vp; Tue, 01 Oct 2019 20:08:34 +0200 From: Geert Uytterhoeven To: Ulf Hansson , Wolfram Sang , Jiri Slaby Cc: Stephen Boyd , Greg Kroah-Hartman , linux-renesas-soc@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] mmc: sh_mmcif: Use platform_get_irq_optional() for optional interrupt Date: Tue, 1 Oct 2019 20:08:34 +0200 Message-Id: <20191001180834.1158-1-geert+renesas@glider.be> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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: sh_mmcif ee200000.mmc: IRQ index 1 not found Fix this by calling platform_get_irq_optional() instead for the second interrupt, which is optional. Remove the now superfluous error printing for the first interrupt, which is mandatory. Fixes: 7723f4c5ecdb8d83 ("driver core: platform: Add an error message to platform_get_irq*()") Signed-off-by: Geert Uytterhoeven --- This is a fix for v5.4-rc1. --- drivers/mmc/host/sh_mmcif.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c index 81bd9afb0980525e..98c575de43c755ed 100644 --- a/drivers/mmc/host/sh_mmcif.c +++ b/drivers/mmc/host/sh_mmcif.c @@ -1393,11 +1393,9 @@ static int sh_mmcif_probe(struct platform_device *pdev) const char *name; irq[0] = platform_get_irq(pdev, 0); - irq[1] = platform_get_irq(pdev, 1); - if (irq[0] < 0) { - dev_err(dev, "Get irq error\n"); + irq[1] = platform_get_irq_optional(pdev, 1); + if (irq[0] < 0) return -ENXIO; - } res = platform_get_resource(pdev, IORESOURCE_MEM, 0); reg = devm_ioremap_resource(dev, res); -- 2.17.1