Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1534635ybg; Sat, 26 Oct 2019 23:23:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqzQfx2s9Pd3cLcshpEwv+HxIEiJsSeWuf/yKVrWwFbndzw3hfxKFWuhNledtvBXyT5TUmof X-Received: by 2002:aa7:d554:: with SMTP id u20mr4860358edr.6.1572157423938; Sat, 26 Oct 2019 23:23:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572157423; cv=none; d=google.com; s=arc-20160816; b=moEu1QDWYJiryrfHie7V03m13Doz37zJra+SKGC3Lr/l4oXa5aSS+rB2Tlb6Sz+5CB 6yh3rdbspSngLAq/63iS2BCjXDF7rystOuF6fAZ3VRtGP85QAw26PBvWdRpzFbduXE7j ZvDCLxd5/sJr3TUnS56c8or9BNr6ZFUFGmst9w/6yFZMat8DsdC3yM6wbWDwwX2LrENV eHS1bRfGWW3fQZVZ1QswMIYejHX5z7/l8c2CS0OJH6FozbEzYACTbEMqHEyhy5mbRyjR G6ArPXNgxIExbV1ir7ogoLU7jedKAeuEndHa9ItagaBXnP0rjW+DbIPH5uAJCJDwMSGv kUcw== 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=+3lnDidMLq9pH/HfMGvaXPaAu41MuLteYv90xyCklUE=; b=GdS8XEI7cPBPhczYdZ50iGJ3u8eXFJ4NG5cG9XQIuzC2KPYvS41pjrOZn5+4Ku3IVA mEXvTbSLOYPYnbAqOWlZhufbi4VK2B8Io0rehE9/ogdsxrdIhxqRpcHm0GcLPZuFN5FX 8IYy81iZblap4r4P75YhnV2wkEhj6Q0OsL2C4wX9IUWxDWWiMo6A1ZCPZUElDIkQsY3v JXRKKAQbQIyWPx78HBs17qHFrItVRaeOARLo6t0kQoJy7JLMz4I3jFmOQNZ11RSGvlhW mZoxW8fXEZOuAgZrF+rE+f+UfY21y2wNZTj+gMnI2o4X530abVBld1AZRVkRSM+HsFY1 VEsQ== 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 p20si4154223ejj.394.2019.10.26.23.22.55; Sat, 26 Oct 2019 23:23:43 -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 S1726002AbfJ0GV4 (ORCPT + 99 others); Sun, 27 Oct 2019 02:21:56 -0400 Received: from mxwww.masterlogin.de ([95.129.51.220]:36188 "EHLO mxwww.masterlogin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725838AbfJ0GVz (ORCPT ); Sun, 27 Oct 2019 02:21:55 -0400 Received: from mxout1.routing.net (unknown [192.168.10.81]) by new.mxwww.masterlogin.de (Postfix) with ESMTPS id 75BCD96C06; Sun, 27 Oct 2019 06:21:51 +0000 (UTC) Received: from mxbox1.masterlogin.de (unknown [192.168.10.88]) by mxout1.routing.net (Postfix) with ESMTP id D3DD543C53; Sun, 27 Oct 2019 06:21:51 +0000 (UTC) Received: from localhost.localdomain (fttx-pool-217.61.153.185.bambit.de [217.61.153.185]) by mxbox1.masterlogin.de (Postfix) with ESMTPSA id 369AB403C2; Sun, 27 Oct 2019 06:21:51 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Greg Kroah-Hartman , Matthias Brugger , linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] serial: 8250-mtk: Use platform_get_irq_optional() for optional irq Date: Sun, 27 Oct 2019 07:21:17 +0100 Message-Id: <20191027062117.20389-1-frank-w@public-files.de> 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, this warnings are printed on bananapi-r2: [ 4.935780] mt6577-uart 11004000.serial: IRQ index 1 not found [ 4.962589] 11002000.serial: ttyS1 at MMIO 0x11002000 (irq = 202, base_baud = 1625000) is a ST16650V2 [ 4.972127] mt6577-uart 11002000.serial: IRQ index 1 not found [ 4.998927] 11003000.serial: ttyS2 at MMIO 0x11003000 (irq = 203, base_baud = 1625000) is a ST16650V2 [ 5.008474] mt6577-uart 11003000.serial: IRQ index 1 not found Fix this by calling platform_get_irq_optional() instead. now it looks like this: [ 4.872751] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled Fixes: 7723f4c5ecdb8d83 ("driver core: platform: Add an error message to platform_get_irq*()") Signed-off-by: Frank Wunderlich --- changes since v1: https://patchwork.kernel.org/patch/11213813/ change from platform_irq_count to platform_get_irq_optional --- drivers/tty/serial/8250/8250_mtk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c index b411ba4eb5e9..4d067f515f74 100644 --- a/drivers/tty/serial/8250/8250_mtk.c +++ b/drivers/tty/serial/8250/8250_mtk.c @@ -544,7 +544,7 @@ static int mtk8250_probe(struct platform_device *pdev) pm_runtime_set_active(&pdev->dev); pm_runtime_enable(&pdev->dev); - data->rx_wakeup_irq = platform_get_irq(pdev, 1); + data->rx_wakeup_irq = platform_get_irq_optional(pdev, 1); return 0; } -- 2.17.1