diff options
author | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2012-12-10 18:43:08 -0500 |
---|---|---|
committer | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2013-01-03 17:10:36 -0500 |
commit | c2f60db740f2935a5e8a348298b590f2462e952f (patch) | |
tree | 3ac76cffef46ff6f72e2708f7f26b9f6d5f32d59 /drivers/usb/core | |
parent | d3b9d7a9051d7024a93c76a84b2f84b3b66ad6d5 (diff) |
USB: Use helper function hub_set_port_link_state
Change the code that manually issues a Set Port Feature(Link State) to
use the new helper function hub_set_port_link_state().
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r-- | drivers/usb/core/hub.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index b00f10956b00..be976ee84b8e 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -2946,9 +2946,7 @@ int usb_port_suspend(struct usb_device *udev, pm_message_t msg) | |||
2946 | 2946 | ||
2947 | /* see 7.1.7.6 */ | 2947 | /* see 7.1.7.6 */ |
2948 | if (hub_is_superspeed(hub->hdev)) | 2948 | if (hub_is_superspeed(hub->hdev)) |
2949 | status = set_port_feature(hub->hdev, | 2949 | status = hub_set_port_link_state(hub, port1, USB_SS_PORT_LS_U3); |
2950 | port1 | (USB_SS_PORT_LS_U3 << 3), | ||
2951 | USB_PORT_FEAT_LINK_STATE); | ||
2952 | else | 2950 | else |
2953 | status = set_port_feature(hub->hdev, port1, | 2951 | status = set_port_feature(hub->hdev, port1, |
2954 | USB_PORT_FEAT_SUSPEND); | 2952 | USB_PORT_FEAT_SUSPEND); |
@@ -3118,9 +3116,7 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg) | |||
3118 | 3116 | ||
3119 | /* see 7.1.7.7; affects power usage, but not budgeting */ | 3117 | /* see 7.1.7.7; affects power usage, but not budgeting */ |
3120 | if (hub_is_superspeed(hub->hdev)) | 3118 | if (hub_is_superspeed(hub->hdev)) |
3121 | status = set_port_feature(hub->hdev, | 3119 | status = hub_set_port_link_state(hub, port1, USB_SS_PORT_LS_U0); |
3122 | port1 | (USB_SS_PORT_LS_U0 << 3), | ||
3123 | USB_PORT_FEAT_LINK_STATE); | ||
3124 | else | 3120 | else |
3125 | status = clear_port_feature(hub->hdev, | 3121 | status = clear_port_feature(hub->hdev, |
3126 | port1, USB_PORT_FEAT_SUSPEND); | 3122 | port1, USB_PORT_FEAT_SUSPEND); |