|
@@ -135,7 +135,7 @@ struct usb_hub *usb_hub_to_struct_hub(struct usb_device *hdev)
|
|
|
return usb_get_intfdata(hdev->actconfig->interface[0]);
|
|
|
}
|
|
|
|
|
|
-static int usb_device_supports_lpm(struct usb_device *udev)
|
|
|
+int usb_device_supports_lpm(struct usb_device *udev)
|
|
|
{
|
|
|
/* USB 2.1 (and greater) devices indicate LPM support through
|
|
|
* their USB 2.0 Extended Capabilities BOS descriptor.
|
|
@@ -156,6 +156,11 @@ static int usb_device_supports_lpm(struct usb_device *udev)
|
|
|
"Power management will be impacted.\n");
|
|
|
return 0;
|
|
|
}
|
|
|
+
|
|
|
+ /* udev is root hub */
|
|
|
+ if (!udev->parent)
|
|
|
+ return 1;
|
|
|
+
|
|
|
if (udev->parent->lpm_capable)
|
|
|
return 1;
|
|
|
|