Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753894AbdLDMD1 (ORCPT ); Mon, 4 Dec 2017 07:03:27 -0500 Received: from mga02.intel.com ([134.134.136.20]:28434 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751711AbdLDMDY (ORCPT ); Mon, 4 Dec 2017 07:03:24 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,359,1508828400"; d="scan'208";a="1251644454" From: Mathias Nyman To: Cc: , jsnitsel@redhat.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Mathias Nyman Subject: [PATCH] usb: Don't print a warning if interface driver rebind is deferred at resume Date: Mon, 4 Dec 2017 14:05:45 +0200 Message-Id: <1512389145-27213-1-git-send-email-mathias.nyman@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <20171118102835.GG8368@kroah.com> References: <20171118102835.GG8368@kroah.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1032 Lines: 29 Interface drivers like btusb that don't support reset-resume will be rebound at resume if port was reset. Rebind is done during the pm_ops .complete callback when probe returns EPROBE_DEFER as default. Remove the "rebind failed: -517" message. Device probe will eventually take place later. [one-liner by Jerry Snitselaar posted in a mailing list question -Mathias] Suggested-by: Jerry Snitselaar Signed-off-by: Mathias Nyman --- drivers/usb/core/driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index 64262a9a..5d34080 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c @@ -1070,7 +1070,7 @@ static void usb_rebind_intf(struct usb_interface *intf) if (!intf->dev.power.is_prepared) { intf->needs_binding = 0; rc = device_attach(&intf->dev); - if (rc < 0) + if (rc < 0 && rc != -EPROBE_DEFER) dev_warn(&intf->dev, "rebind failed: %d\n", rc); } } -- 2.7.4