Commit e7e6da9e authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman

USB: Remove usages of dev->power.power_state

This patch (as922) removes all but one of the remaining vestiges of
dev->power.power_state from usbcore.  The only usage left must remain
until the deprecated "power/state" sysfs attribute is gone.
Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 317c67b8
...@@ -1196,10 +1196,6 @@ static int usb_resume_both(struct usb_device *udev) ...@@ -1196,10 +1196,6 @@ static int usb_resume_both(struct usb_device *udev)
/* We can't progagate beyond the USB subsystem, /* We can't progagate beyond the USB subsystem,
* so if a root hub's controller is suspended * so if a root hub's controller is suspended
* then we're stuck. */ * then we're stuck. */
if (udev->dev.parent->power.power_state.event !=
PM_EVENT_ON)
status = -EHOSTUNREACH;
else
status = usb_resume_device(udev); status = usb_resume_device(udev);
} }
} else { } else {
......
...@@ -965,19 +965,9 @@ int usb_hcd_submit_urb (struct urb *urb, gfp_t mem_flags) ...@@ -965,19 +965,9 @@ int usb_hcd_submit_urb (struct urb *urb, gfp_t mem_flags)
else switch (hcd->state) { else switch (hcd->state) {
case HC_STATE_RUNNING: case HC_STATE_RUNNING:
case HC_STATE_RESUMING: case HC_STATE_RESUMING:
doit:
list_add_tail (&urb->urb_list, &ep->urb_list); list_add_tail (&urb->urb_list, &ep->urb_list);
status = 0; status = 0;
break; break;
case HC_STATE_SUSPENDED:
/* HC upstream links (register access, wakeup signaling) can work
* even when the downstream links (and DMA etc) are quiesced; let
* usbcore talk to the root hub.
*/
if (hcd->self.controller->power.power_state.event == PM_EVENT_ON
&& urb->dev->parent == NULL)
goto doit;
/* FALL THROUGH */
default: default:
status = -ESHUTDOWN; status = -ESHUTDOWN;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment