aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/core')
-rw-r--r--drivers/usb/core/hcd.c1
-rw-r--r--drivers/usb/core/hub.c7
-rw-r--r--drivers/usb/core/usb.h1
3 files changed, 1 insertions, 8 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 199aaea6bfe0..2518c3250750 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -1032,7 +1032,6 @@ static int register_root_hub(struct usb_hcd *hcd)
1032 dev_name(&usb_dev->dev), retval); 1032 dev_name(&usb_dev->dev), retval);
1033 return retval; 1033 return retval;
1034 } 1034 }
1035 usb_dev->lpm_capable = usb_device_supports_lpm(usb_dev);
1036 } 1035 }
1037 1036
1038 retval = usb_new_device (usb_dev); 1037 retval = usb_new_device (usb_dev);
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index babba885978d..64ea21971be2 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -128,7 +128,7 @@ struct usb_hub *usb_hub_to_struct_hub(struct usb_device *hdev)
128 return usb_get_intfdata(hdev->actconfig->interface[0]); 128 return usb_get_intfdata(hdev->actconfig->interface[0]);
129} 129}
130 130
131int usb_device_supports_lpm(struct usb_device *udev) 131static int usb_device_supports_lpm(struct usb_device *udev)
132{ 132{
133 /* USB 2.1 (and greater) devices indicate LPM support through 133 /* USB 2.1 (and greater) devices indicate LPM support through
134 * their USB 2.0 Extended Capabilities BOS descriptor. 134 * their USB 2.0 Extended Capabilities BOS descriptor.
@@ -149,11 +149,6 @@ int usb_device_supports_lpm(struct usb_device *udev)
149 "Power management will be impacted.\n"); 149 "Power management will be impacted.\n");
150 return 0; 150 return 0;
151 } 151 }
152
153 /* udev is root hub */
154 if (!udev->parent)
155 return 1;
156
157 if (udev->parent->lpm_capable) 152 if (udev->parent->lpm_capable)
158 return 1; 153 return 1;
159 154
diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h
index c49383669cd8..823857767a16 100644
--- a/drivers/usb/core/usb.h
+++ b/drivers/usb/core/usb.h
@@ -35,7 +35,6 @@ extern int usb_get_device_descriptor(struct usb_device *dev,
35 unsigned int size); 35 unsigned int size);
36extern int usb_get_bos_descriptor(struct usb_device *dev); 36extern int usb_get_bos_descriptor(struct usb_device *dev);
37extern void usb_release_bos_descriptor(struct usb_device *dev); 37extern void usb_release_bos_descriptor(struct usb_device *dev);
38extern int usb_device_supports_lpm(struct usb_device *udev);
39extern char *usb_cache_string(struct usb_device *udev, int index); 38extern char *usb_cache_string(struct usb_device *udev, int index);
40extern int usb_set_configuration(struct usb_device *dev, int configuration); 39extern int usb_set_configuration(struct usb_device *dev, int configuration);
41extern int usb_choose_configuration(struct usb_device *udev); 40extern int usb_choose_configuration(struct usb_device *udev);