aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-omap.c
diff options
context:
space:
mode:
authorRussell King <rmk@arm.linux.org.uk>2005-10-28 12:52:56 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-10-28 12:52:56 -0400
commit9480e307cd88ef09ec9294c7d97ebec18e6d2221 (patch)
tree967e26d3a23c24dd52b114d672312c207714308c /drivers/usb/host/ohci-omap.c
parenta3a3395e487abc4c1371fe319a8ecbb3913a70a4 (diff)
[PATCH] DRIVER MODEL: Get rid of the obsolete tri-level suspend/resume callbacks
In PM v1, all devices were called at SUSPEND_DISABLE level. Then all devices were called at SUSPEND_SAVE_STATE level, and finally SUSPEND_POWER_DOWN level. However, with PM v2, to maintain compatibility for platform devices, I arranged for the PM v2 suspend/resume callbacks to call the old PM v1 suspend/resume callbacks three times with each level in order so that existing drivers continued to work. Since this is obsolete infrastructure which is no longer necessary, we can remove it. Here's an (untested) patch to do exactly that. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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;