aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/core/driver.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index e76e95f62f76..7652dcb57998 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -512,7 +512,6 @@ int usb_driver_claim_interface(struct usb_driver *driver,
512 struct device *dev; 512 struct device *dev;
513 struct usb_device *udev; 513 struct usb_device *udev;
514 int retval = 0; 514 int retval = 0;
515 int lpm_disable_error = -ENODEV;
516 515
517 if (!iface) 516 if (!iface)
518 return -ENODEV; 517 return -ENODEV;
@@ -533,16 +532,6 @@ int usb_driver_claim_interface(struct usb_driver *driver,
533 532
534 iface->condition = USB_INTERFACE_BOUND; 533 iface->condition = USB_INTERFACE_BOUND;
535 534
536 /* See the comment about disabling LPM in usb_probe_interface(). */
537 if (driver->disable_hub_initiated_lpm) {
538 lpm_disable_error = usb_unlocked_disable_lpm(udev);
539 if (lpm_disable_error) {
540 dev_err(&iface->dev, "%s Failed to disable LPM for driver %s\n",
541 __func__, driver->name);
542 return -ENOMEM;
543 }
544 }
545
546 /* Claimed interfaces are initially inactive (suspended) and 535 /* Claimed interfaces are initially inactive (suspended) and
547 * runtime-PM-enabled, but only if the driver has autosuspend 536 * runtime-PM-enabled, but only if the driver has autosuspend
548 * support. Otherwise they are marked active, to prevent the 537 * support. Otherwise they are marked active, to prevent the
@@ -561,10 +550,6 @@ int usb_driver_claim_interface(struct usb_driver *driver,
561 if (device_is_registered(dev)) 550 if (device_is_registered(dev))
562 retval = device_bind_driver(dev); 551 retval = device_bind_driver(dev);
563 552
564 /* Attempt to re-enable USB3 LPM, if the disable was successful. */
565 if (!lpm_disable_error)
566 usb_unlocked_enable_lpm(udev);
567
568 return retval; 553 return retval;
569} 554}
570EXPORT_SYMBOL_GPL(usb_driver_claim_interface); 555EXPORT_SYMBOL_GPL(usb_driver_claim_interface);