aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-omap.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ohci-omap.c')
-rw-r--r--drivers/usb/host/ohci-omap.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c
index d8f3ba7ad52e..a574216625a0 100644
--- a/drivers/usb/host/ohci-omap.c
+++ b/drivers/usb/host/ohci-omap.c
@@ -455,14 +455,11 @@ static int ohci_hcd_omap_drv_remove(struct device *dev)
455 455
456#ifdef CONFIG_PM 456#ifdef CONFIG_PM
457 457
458static int ohci_omap_suspend(struct device *dev, pm_message_t message, u32 level) 458static int ohci_omap_suspend(struct device *dev, pm_message_t message)
459{ 459{
460 struct ohci_hcd *ohci = hcd_to_ohci(dev_get_drvdata(dev)); 460 struct ohci_hcd *ohci = hcd_to_ohci(dev_get_drvdata(dev));
461 int status = -EINVAL; 461 int status = -EINVAL;
462 462
463 if (level != SUSPEND_POWER_DOWN)
464 return 0;
465
466 down(&ohci_to_hcd(ohci)->self.root_hub->serialize); 463 down(&ohci_to_hcd(ohci)->self.root_hub->serialize);
467 status = ohci_hub_suspend(ohci_to_hcd(ohci)); 464 status = ohci_hub_suspend(ohci_to_hcd(ohci));
468 if (status == 0) { 465 if (status == 0) {
@@ -476,14 +473,11 @@ static int ohci_omap_suspend(struct device *dev, pm_message_t message, u32 level
476 return status; 473 return status;
477} 474}
478 475
479static int ohci_omap_resume(struct device *dev, u32 level) 476static int ohci_omap_resume(struct device *dev)
480{ 477{
481 struct ohci_hcd *ohci = hcd_to_ohci(dev_get_drvdata(dev)); 478 struct ohci_hcd *ohci = hcd_to_ohci(dev_get_drvdata(dev));
482 int status = 0; 479 int status = 0;
483 480
484 if (level != RESUME_POWER_ON)
485 return 0;
486
487 if (time_before(jiffies, ohci->next_statechange)) 481 if (time_before(jiffies, ohci->next_statechange))
488 msleep(5); 482 msleep(5);
489 ohci->next_statechange = jiffies; 483 ohci->next_statechange = jiffies;