Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp730232ybp; Wed, 9 Oct 2019 03:22:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqznMu8SMYW+BIs3Xo2dEYFLyqy+L4QAKne2+09cW/t15maHOhVrjSM9Mg4krUnDXHkh4F4V X-Received: by 2002:a50:ed10:: with SMTP id j16mr2172405eds.227.1570616527819; Wed, 09 Oct 2019 03:22:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570616527; cv=none; d=google.com; s=arc-20160816; b=Y56MyiWcPayWdyh+Wu9j+J9YTmF9AGiTeHoWlTZYkIW6mLHqYrS348GAnL5Hvby2Yw D5lpFbfR6eOep3mR162kfE42xnBi49Q7Kdy7CLjSPz2KBzz+XIWyKxNqKijv5W39HuCN y/FFghn+xMlmGH9AaSu7np5yrzVPcdxlFjnQdQnyA97XcDb9GrGmly9pbeivQReWChu5 V/7OAAMS91RL/CnQZl88ncO+7jj/GYoz7bOCh+YXQlYkUHAlvOfNdwivmRL/XWlcyHKi XG2erJMjGg0tho+VIpj09PwlwscY6FkP+a72Y9RYvKjt6lpn6D9GO/FFNK9cTYsqw8Fp 98NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=FXcJ0owN1WbPGDcli+fqX//rns9Tk/joV7Tj6dZ7RdA=; b=dO06Ls+eJyf0PsOkLO0mcgcyITGvuHMCovjknW6S19304VDRJh/KKuDekgw8NO5owd Rwj+3te1n9rggPgCkMYT+o5Y/T23LWbovPrqnHTgwlGsABbrQoN9fxh/h+V5kpE42GOf 5cpsDEdk7wwIRiz3oZgNKb/zNrUdlUcSxcPx7Zcc7/15MsEz4LjdtBY5LEvrKn8PztlG 5eGlq83HwA/QMMyRtvCEZuwrBO/iSRTb1Km9MjMWi7kci03Bej8H7Pvylb9VVyQvFXFP haKWTB48QRPUqO/ZG+l+W5PpILN2L+98xNy0BieALAUAIoslDW66gkd7lX3hDguOsomG AYag== 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 u16si847299ejx.179.2019.10.09.03.21.44; Wed, 09 Oct 2019 03:22:07 -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 S1731181AbfJIKSS (ORCPT + 99 others); Wed, 9 Oct 2019 06:18:18 -0400 Received: from inva020.nxp.com ([92.121.34.13]:54076 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731144AbfJIKSK (ORCPT ); Wed, 9 Oct 2019 06:18:10 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id C416F1A0012; Wed, 9 Oct 2019 12:18:09 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 57F1E1A0266; Wed, 9 Oct 2019 12:18:05 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 991C1402EC; Wed, 9 Oct 2019 18:17:59 +0800 (SGT) From: Anson Huang To: fugang.duan@nxp.com, davem@davemloft.net, gregkh@linuxfoundation.org, andy.shevchenko@gmail.com, rafael.j.wysocki@intel.com, swboyd@chromium.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH 2/2] net: fec_ptp: Use platform_get_irq_xxx_optional() to avoid error message Date: Wed, 9 Oct 2019 18:15:48 +0800 Message-Id: <1570616148-11571-2-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1570616148-11571-1-git-send-email-Anson.Huang@nxp.com> References: <1570616148-11571-1-git-send-email-Anson.Huang@nxp.com> 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 Use platform_get_irq_byname_optional() and platform_get_irq_optional() instead of platform_get_irq_byname() and platform_get_irq() for optional IRQs to avoid below error message during probe: [ 0.795803] fec 30be0000.ethernet: IRQ pps not found [ 0.800787] fec 30be0000.ethernet: IRQ index 3 not found Fixes: 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()") Signed-off-by: Anson Huang --- drivers/net/ethernet/freescale/fec_ptp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c index 19e2365..945643c 100644 --- a/drivers/net/ethernet/freescale/fec_ptp.c +++ b/drivers/net/ethernet/freescale/fec_ptp.c @@ -600,9 +600,9 @@ void fec_ptp_init(struct platform_device *pdev, int irq_idx) INIT_DELAYED_WORK(&fep->time_keep, fec_time_keep); - irq = platform_get_irq_byname(pdev, "pps"); + irq = platform_get_irq_byname_optional(pdev, "pps"); if (irq < 0) - irq = platform_get_irq(pdev, irq_idx); + irq = platform_get_irq_optional(pdev, irq_idx); /* Failure to get an irq is not fatal, * only the PTP_CLOCK_PPS clock events should stop */ -- 2.7.4