]> err.no Git - linux-2.6/commitdiff
USB: Remove usages of dev->power.power_state
authorAlan Stern <stern@rowland.harvard.edu>
Thu, 21 Jun 2007 20:25:17 +0000 (16:25 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 12 Jul 2007 23:34:39 +0000 (16:34 -0700)
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: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/driver.c
drivers/usb/core/hcd.c

index 3cd9af2638fc6a209bc0d1cb3cb128b54a751a72..a3aed8d87ddc8dfc66168588b1e3f719ba965b24 100644 (file)
@@ -1196,11 +1196,7 @@ static int usb_resume_both(struct usb_device *udev)
                        /* We can't progagate beyond the USB subsystem,
                         * so if a root hub's controller is suspended
                         * 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 {
 
index 3df538539b48a0c00159e10f5ce88efeae5be164..5254c50086a8eaa0687d40b137619e3e9e2e6c09 100644 (file)
@@ -965,19 +965,9 @@ int usb_hcd_submit_urb (struct urb *urb, gfp_t mem_flags)
        else switch (hcd->state) {
        case HC_STATE_RUNNING:
        case HC_STATE_RESUMING:
-doit:
                list_add_tail (&urb->urb_list, &ep->urb_list);
                status = 0;
                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:
                status = -ESHUTDOWN;
                break;