Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4538604ybv; Mon, 17 Feb 2020 00:57:37 -0800 (PST) X-Google-Smtp-Source: APXvYqxftU/Jbrmre8Br0eY4IQcnrk/16IZNiEbehi5+Kf6M2vocu20xhbUj6jpdEd4s0QcMSsL/ X-Received: by 2002:a9d:6457:: with SMTP id m23mr11613848otl.162.1581929857633; Mon, 17 Feb 2020 00:57:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581929857; cv=none; d=google.com; s=arc-20160816; b=BLaK1S8Dst1WMpj5Q+GFl3dk2HZ3bi9mNEv26vGEz1n38APlagKDqhd0IpmskYX/at nd3laSlxMprrrFNITNU2ADcrbg94sbH73bHNejF0w/peNVn3pD4fEOx2iM3EAfru9X/V tGlo1cX5jnTnTLby2ZMoy7EeSqP8KWQvhFqYYPHopLGy7VQuMvSYd68uVVpF8TlvqMFT eVg2YrpD5Wy8h+521Xw/e2SDDd3o+/+FUqwJFSV0t1M1eCmW2Zmiaq4vg3Elh3Jh1lhX prh7u8ol8AL8sHzPtdxtLqA0aO1MNAtMMz8xSuyZckQMeRtIxIpYQEkFlrIY3Btg39pv CM9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=eH23xUz7bTdqA4S1ozloDBOylhj7VC8PtsgSktH+a/w=; b=q9JTvTI1TTHlYI+GWGwtqzkdgCxtg2hCptoRg1xuFFM7fa6Nruy92FMqu5agOAGGDp oSrW1rc3WpQ2eDKIrxUyCO8k32el7DWY22NdZL64+vXg65mDoT2o1Q+w0sNSNJ0XQpLx wsv3ADz1Fp54o4JuWIquvnyIPn10homdTXJ2ywdRL2AuJ5/lJw1k3JWGFax+SGpHxFGd PjPbu60xALEjh71WIFABKCnA/tlgV/KyvOkk/xF6VErcDiYb9ubcqGHcAsfcr6VItfdk U+cFXRZnIc0bvg7+a2HvWqrS+7AwDpXv229AKgVy0CMR3KmaTGGEtIumTN8zxxhI2twf L3KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@goldelico.com header.s=strato-dkim-0002 header.b=Rg1DywqL; 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 x11si6453359otp.285.2020.02.17.00.57.24; Mon, 17 Feb 2020 00:57:37 -0800 (PST) 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; dkim=fail header.i=@goldelico.com header.s=strato-dkim-0002 header.b=Rg1DywqL; 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 S1728618AbgBQIzr (ORCPT + 99 others); Mon, 17 Feb 2020 03:55:47 -0500 Received: from mo4-p01-ob.smtp.rzone.de ([85.215.255.54]:23678 "EHLO mo4-p01-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728570AbgBQIzr (ORCPT ); Mon, 17 Feb 2020 03:55:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1581929745; s=strato-dkim-0002; d=goldelico.com; h=Message-Id:Date:Subject:Cc:To:From:X-RZG-CLASS-ID:X-RZG-AUTH:From: Subject:Sender; bh=eH23xUz7bTdqA4S1ozloDBOylhj7VC8PtsgSktH+a/w=; b=Rg1DywqLaTkF5MjthtqqPkFas5Z4ZTN6aErgcIQpEApfugfp5BzRd0CBjhBfudEF63 Usy4Nul+mFTxWPXQDKHIDR023lxxPZg5qBuJdeFPXdkUvx1rqP88Mygv/yF24+4cFTmZ R0UZ5J5P4HkPJCya9oeiVh/ieRYRfAtA9ekAMErpAmGQrTRyY3rYLdkmWRHYd3xy55q+ GvPO/Rr3LvtVLSUr/3Ek3AmwZkr1LqIlsn9fsOKppA+6rMbXLvj6eDhrFuBsKDkld00x wm8DD8UMuK1nsE+8Y/2IrN/ytjM8ul67D6NCE362aD0iPER17bupDgT1SnF1oRzTe3/d /nMA== X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMhflhwDubTJ9o1mfYzBGHXL8GTnsvhg=" X-RZG-CLASS-ID: mo00 Received: from iMac.fritz.box by smtp.strato.de (RZmta 46.1.12 DYNA|AUTH) with ESMTPSA id U06217w1H8tgLO9 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 17 Feb 2020 09:55:42 +0100 (CET) From: "H. Nikolaus Schaller" To: MyungJoo Ham , Chanwoo Choi Cc: linux-kernel@vger.kernel.org, letux-kernel@openphoenux.org, kernel@pyra-handheld.com, linux-omap@vger.kernel.org, "H. Nikolaus Schaller" Subject: [PATCH] extcon: palmas: hide error messages if gpio returns -EPROBE_DEFER Date: Mon, 17 Feb 2020 09:55:42 +0100 Message-Id: X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If the gpios are probed after this driver (e.g. if they come from an i2c expander) there is no need to print an error message. Signed-off-by: H. Nikolaus Schaller --- drivers/extcon/extcon-palmas.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c index edc5016f46f1..9c6254c0531c 100644 --- a/drivers/extcon/extcon-palmas.c +++ b/drivers/extcon/extcon-palmas.c @@ -206,14 +206,16 @@ static int palmas_usb_probe(struct platform_device *pdev) palmas_usb->id_gpiod = devm_gpiod_get_optional(&pdev->dev, "id", GPIOD_IN); if (IS_ERR(palmas_usb->id_gpiod)) { - dev_err(&pdev->dev, "failed to get id gpio\n"); + if (PTR_ERR(palmas_usb->id_gpiod) != -EPROBE_DEFER) + dev_err(&pdev->dev, "failed to get id gpio\n"); return PTR_ERR(palmas_usb->id_gpiod); } palmas_usb->vbus_gpiod = devm_gpiod_get_optional(&pdev->dev, "vbus", GPIOD_IN); if (IS_ERR(palmas_usb->vbus_gpiod)) { - dev_err(&pdev->dev, "failed to get vbus gpio\n"); + if (PTR_ERR(palmas_usb->vbus_gpiod) != -EPROBE_DEFER) + dev_err(&pdev->dev, "failed to get vbus gpio\n"); return PTR_ERR(palmas_usb->vbus_gpiod); } -- 2.23.0