diff options
Diffstat (limited to 'drivers/usb/host/ohci-pci.c')
-rw-r--r-- | drivers/usb/host/ohci-pci.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c index f9961b4c0da3..d2ba04dd785e 100644 --- a/drivers/usb/host/ohci-pci.c +++ b/drivers/usb/host/ohci-pci.c | |||
@@ -372,7 +372,7 @@ static int __devinit ohci_pci_start (struct usb_hcd *hcd) | |||
372 | 372 | ||
373 | #ifdef CONFIG_PM | 373 | #ifdef CONFIG_PM |
374 | 374 | ||
375 | static int ohci_pci_suspend (struct usb_hcd *hcd, pm_message_t message) | 375 | static int ohci_pci_suspend(struct usb_hcd *hcd) |
376 | { | 376 | { |
377 | struct ohci_hcd *ohci = hcd_to_ohci (hcd); | 377 | struct ohci_hcd *ohci = hcd_to_ohci (hcd); |
378 | unsigned long flags; | 378 | unsigned long flags; |
@@ -394,10 +394,6 @@ static int ohci_pci_suspend (struct usb_hcd *hcd, pm_message_t message) | |||
394 | ohci_writel(ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable); | 394 | ohci_writel(ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable); |
395 | (void)ohci_readl(ohci, &ohci->regs->intrdisable); | 395 | (void)ohci_readl(ohci, &ohci->regs->intrdisable); |
396 | 396 | ||
397 | /* make sure snapshot being resumed re-enumerates everything */ | ||
398 | if (message.event == PM_EVENT_PRETHAW) | ||
399 | ohci_usb_reset(ohci); | ||
400 | |||
401 | clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); | 397 | clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); |
402 | bail: | 398 | bail: |
403 | spin_unlock_irqrestore (&ohci->lock, flags); | 399 | spin_unlock_irqrestore (&ohci->lock, flags); |
@@ -406,9 +402,14 @@ static int ohci_pci_suspend (struct usb_hcd *hcd, pm_message_t message) | |||
406 | } | 402 | } |
407 | 403 | ||
408 | 404 | ||
409 | static int ohci_pci_resume (struct usb_hcd *hcd) | 405 | static int ohci_pci_resume(struct usb_hcd *hcd, bool hibernated) |
410 | { | 406 | { |
411 | set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); | 407 | set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); |
408 | |||
409 | /* Make sure resume from hibernation re-enumerates everything */ | ||
410 | if (hibernated) | ||
411 | ohci_usb_reset(hcd_to_ohci(hcd)); | ||
412 | |||
412 | ohci_finish_controller_resume(hcd); | 413 | ohci_finish_controller_resume(hcd); |
413 | return 0; | 414 | return 0; |
414 | } | 415 | } |
@@ -484,12 +485,11 @@ static struct pci_driver ohci_pci_driver = { | |||
484 | 485 | ||
485 | .probe = usb_hcd_pci_probe, | 486 | .probe = usb_hcd_pci_probe, |
486 | .remove = usb_hcd_pci_remove, | 487 | .remove = usb_hcd_pci_remove, |
488 | .shutdown = usb_hcd_pci_shutdown, | ||
487 | 489 | ||
488 | #ifdef CONFIG_PM | 490 | #ifdef CONFIG_PM_SLEEP |
489 | .suspend = usb_hcd_pci_suspend, | 491 | .driver = { |
490 | .resume = usb_hcd_pci_resume, | 492 | .pm = &usb_hcd_pci_pm_ops |
493 | }, | ||
491 | #endif | 494 | #endif |
492 | |||
493 | .shutdown = usb_hcd_pci_shutdown, | ||
494 | }; | 495 | }; |
495 | |||