Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp699592ybp; Wed, 9 Oct 2019 02:52:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqz3EfL9/Rt76+ymrbA8IjY21fqtbbPn2NDF5X5UM5z1ye34BCwE8pT5R+yLbrCIPlDOvLdJ X-Received: by 2002:a17:906:4d06:: with SMTP id r6mr1934633eju.90.1570614756420; Wed, 09 Oct 2019 02:52:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570614756; cv=none; d=google.com; s=arc-20160816; b=q+KPjE46i1XbTCZTsFa5RIzVx90MW+ExYHng/hnNcve2DxnIE+EylVIpWYfGnY+UCs IkPBZnMSl+TR7afAk5cjrgdSnkWpfoEn8FLL8XzlleVqRs7qKsPPbJDf6OkztqEym0mI rcmmIm7RapvErfThz/ZWPv+eDjAytzNZYRkErpUtCc78u4Oc+nVVCQZCIi3EntA7cAN+ hPTxNc93WQOwJOmMdWGpxD0hWbBJmGBRvJoQUjWj1F7uLcSY/XraT5W54GhzOwNqdU2h 1B14BHqzNoarzPL8zHqcNnJqy9an/3MJY5fvpDN19GFd4wL6NXXpMxeGSAThreUA22i3 KaSQ== 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=FW1qmnbLk4zsl+0i544x7MaS4+Zu73TDSdU9e08y1wY=; b=UTKsw2nFhdkxaprGx1Fb2WMmlx1osdRQr/nyFwvPzsoJyzuMyCZJoI/XDzMEj0DnYQ g0Sj+Hg5iOU2zt2FcuagDoJNQgLP9ZvMGow5KCaGYSxl/tmZXUeBxd1PvbAINSgAl7XJ c1JOov88YcfGh1kvp19JvRJJXDCs+XU7+t95MHaMScBVZTiptoulpaGNDLlfEccVfCdQ mSIjKcrqn1j2TzX4u6Er54EgvW4lFbAMpC4LzfCsJIuZASDCWK3/c2lLI7hbSu+udV4f EWMVBUfxzd5728v9jlbOUgC4jzskw+Z1cDT3XGpUsX8+VMZcWqFjAtFGpuBOnGz2SI/E 3JuQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x19si821405eje.336.2019.10.09.02.52.13; Wed, 09 Oct 2019 02:52:36 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730252AbfJIJvu (ORCPT + 99 others); Wed, 9 Oct 2019 05:51:50 -0400 Received: from inva021.nxp.com ([92.121.34.21]:35598 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727657AbfJIJvu (ORCPT ); Wed, 9 Oct 2019 05:51:50 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 6275C2003A5; Wed, 9 Oct 2019 11:51:48 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 452862001C1; Wed, 9 Oct 2019 11:51:42 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 9025E402B1; Wed, 9 Oct 2019 17:51:34 +0800 (SGT) From: Anson Huang To: gregkh@linuxfoundation.org, jslaby@suse.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, rafael.j.wysocki@intel.com, swboyd@chromium.org, andy.shevchenko@gmail.com, linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH V2] tty: serial: imx: Use platform_get_irq_optional() for optional IRQs Date: Wed, 9 Oct 2019 17:49:19 +0800 Message-Id: <1570614559-11900-1-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org All i.MX SoCs except i.MX1 have ONLY one necessary IRQ, use platform_get_irq_optional() to get second/third IRQ which are optional to avoid below error message during probe: [ 0.726219] imx-uart 30860000.serial: IRQ index 1 not found [ 0.731329] imx-uart 30860000.serial: IRQ index 2 not found Fixes: 7723f4c5ecdb8d83 ("driver core: platform: Add an error message to platform_get_irq*()") Signed-off-by: Anson Huang --- Changes since V1: - use platform_get_irq_optional() directly instead of getting irq count. --- drivers/tty/serial/imx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 504d81c..357d3ff 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -2221,8 +2221,8 @@ static int imx_uart_probe(struct platform_device *pdev) return PTR_ERR(base); rxirq = platform_get_irq(pdev, 0); - txirq = platform_get_irq(pdev, 1); - rtsirq = platform_get_irq(pdev, 2); + txirq = platform_get_irq_optional(pdev, 1); + rtsirq = platform_get_irq_optional(pdev, 2); sport->port.dev = &pdev->dev; sport->port.mapbase = res->start; -- 2.7.4