Skip to content

Commit

Permalink
USB: Use helper function hub_set_port_link_state
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sarah Sharp committed Jan 3, 2013
1 parent d3b9d7a commit c2f60db
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/usb/core/hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -2946,9 +2946,7 @@ int usb_port_suspend(struct usb_device *udev, pm_message_t msg)

/* see 7.1.7.6 */
if (hub_is_superspeed(hub->hdev))
status = set_port_feature(hub->hdev,
port1 | (USB_SS_PORT_LS_U3 << 3),
USB_PORT_FEAT_LINK_STATE);
status = hub_set_port_link_state(hub, port1, USB_SS_PORT_LS_U3);
else
status = set_port_feature(hub->hdev, port1,
USB_PORT_FEAT_SUSPEND);
Expand Down Expand Up @@ -3118,9 +3116,7 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)

/* see 7.1.7.7; affects power usage, but not budgeting */
if (hub_is_superspeed(hub->hdev))
status = set_port_feature(hub->hdev,
port1 | (USB_SS_PORT_LS_U0 << 3),
USB_PORT_FEAT_LINK_STATE);
status = hub_set_port_link_state(hub, port1, USB_SS_PORT_LS_U0);
else
status = clear_port_feature(hub->hdev,
port1, USB_PORT_FEAT_SUSPEND);
Expand Down

0 comments on commit c2f60db

Please sign in to comment.