]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/host/ohci-hub.c
USB: ohci-hcd: fix compiler warning
[linux-2.6-omap-h63xx.git] / drivers / usb / host / ohci-hub.c
index 6f113596af66c1660ecc2548f6b8c40b5c26d4e5..99357b99d133bbe8c83581ad1df9b81bf66ef528 100644 (file)
@@ -50,6 +50,10 @@ static void ohci_rhsc_enable (struct usb_hcd *hcd)
 static void dl_done_list (struct ohci_hcd *);
 static void finish_unlinks (struct ohci_hcd *, u16);
 
+#ifdef CONFIG_PM
+static int ohci_restart(struct ohci_hcd *ohci);
+#endif
+
 static int ohci_rh_suspend (struct ohci_hcd *ohci, int autostop)
 __releases(ohci->lock)
 __acquires(ohci->lock)
@@ -132,8 +136,6 @@ static inline struct ed *find_head (struct ed *ed)
        return ed;
 }
 
-static int ohci_restart (struct ohci_hcd *ohci);
-
 /* caller has locked the root hub */
 static int ohci_rh_resume (struct ohci_hcd *ohci)
 __releases(ohci->lock)
@@ -169,7 +171,8 @@ __acquires(ohci->lock)
                break;
        case OHCI_USB_RESUME:
                /* HCFS changes sometime after INTR_RD */
-               ohci_info (ohci, "wakeup\n");
+               ohci_info(ohci, "%swakeup\n",
+                               autostopped ? "auto-" : "");
                break;
        case OHCI_USB_OPER:
                /* this can happen after resuming a swsusp snapshot */
@@ -422,7 +425,8 @@ ohci_hub_status_data (struct usb_hcd *hcd, char *buf)
                                ohci->autostop = 0;
                                ohci->next_statechange = jiffies +
                                                STATECHANGE_DELAY;
-                       } else if (time_after_eq (jiffies,
+                       } else if (device_may_wakeup(&hcd->self.root_hub->dev)
+                                       && time_after_eq(jiffies,
                                                ohci->next_statechange)
                                        && !ohci->ed_rm_list
                                        && !(ohci->hc_control &