]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
usb: Don't print a warning if interface driver rebind is deferred at resume
authorMathias Nyman <mathias.nyman@linux.intel.com>
Mon, 4 Dec 2017 12:05:45 +0000 (14:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 Dec 2017 15:03:15 +0000 (16:03 +0100)
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 <jsnitsel@redhat.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/driver.c

index d8d7377b5fb8c739d8973a19ea8f69ed58a6fda4..9792cedfc3519a0f0f1c5f1a733c196a1c1bf5a7 100644 (file)
@@ -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);
        }
 }