Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4009972ybg; Tue, 29 Oct 2019 00:23:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqyuXBXj9FaXqam6TesZIVpFBzwEizLfAxOh2ejh3gwMgOpUc708o48lVjBL+goJujk4vIGA X-Received: by 2002:a50:8871:: with SMTP id c46mr24163580edc.24.1572333781505; Tue, 29 Oct 2019 00:23:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572333781; cv=none; d=google.com; s=arc-20160816; b=CpLrqhY30QBjDaGaZQ6bJXkEvZML2VEorVKS5NXu/AMw4PRhnQxOu6e35+pA9ciSpb 7d+TBmIZPd/0kpqPj/+VwI3NCVnWnbdhGBqDO2TrVugQqVN51ifpSpH0UIKiWCB5kq9S LS9KobtwB5MriR03Mp4YauilwHIzPBYmfl9Dq1k+LrPa8iae08tpUlKm/lmm1kIa33S7 PFXo+49um1S8xreIO+WqM02s8/kLkOtvoD0oetjCnNy7g9VC9XX8Xfzvi5qLvuzvd3F1 +k8Sy6xSffBadDfoWXkT+hTpNUFvUCEZ26dr/iusWu0WqDNAmVxUTBKKVKku64S5qO9c BkFw== 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=jLBIOA7nqHJEmCg4s/ME1/5gR8rbVYOpy0T4KzLNxq4=; b=dpkRmiTWM4RmP1BohDG/yEi6DXeWDENe9J2hdw2S7TddUvoRj8YW67ZDfer63/ec3E yqFxsXPD+izFJcG+iVEtimus7f2Nj+R180ocs9JletAfDGvspbCXxnur0ytf4in3JVNf p7JnudLqpj2Xeap6qu76inYkusyxrSnGGO2x7EpWPvtDr1yptgn5XcDw6YCu8gk4e5ZM 2TgvoCw73m2W5XpWi+Adjmdk70aZp9H7ph49O/fb+4BlscGwGhlUf2VYm5uNILa2ngs5 46AXnZq1Kv8cZ28P1+QZzWAwSIf3xcVmvm5IwtEUaLK2SpKWJOo8PRBxhFKoDECSqHzq Lp4A== 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 bo19si2085647ejb.242.2019.10.29.00.22.38; Tue, 29 Oct 2019 00:23:01 -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 S1730211AbfJ2B4m (ORCPT + 99 others); Mon, 28 Oct 2019 21:56:42 -0400 Received: from inva020.nxp.com ([92.121.34.13]:58290 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730082AbfJ2B4h (ORCPT ); Mon, 28 Oct 2019 21:56:37 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id CCB4F1A00F4; Tue, 29 Oct 2019 02:56:35 +0100 (CET) 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 40EAD1A0310; Tue, 29 Oct 2019 02:56:33 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id B4FE3402E2; Tue, 29 Oct 2019 09:56:29 +0800 (SGT) From: Anson Huang To: fugang.duan@nxp.com, davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH RESEND 2/2] net: fec_ptp: Use platform_get_irq_xxx_optional() to avoid error message Date: Tue, 29 Oct 2019 09:53:19 +0800 Message-Id: <1572313999-23317-2-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1572313999-23317-1-git-send-email-Anson.Huang@nxp.com> References: <1572313999-23317-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 Signed-off-by: Anson Huang Acked-by: Fugang Duan Reviewed-by: Stephen Boyd --- - The patch f1da567f1dc1 ("driver core: platform: Add platform_get_irq_byname_optional()") already landed on network/master, resend this patch set. --- 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