aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/isp116x-hcd.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/isp116x-hcd.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/isp116x-hcd.c')
-rw-r--r--drivers/usb/host/isp116x-hcd.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c
index e142056b0d2c..0f6183a829c4 100644
--- a/drivers/usb/host/isp116x-hcd.c
+++ b/drivers/usb/host/isp116x-hcd.c
@@ -1774,15 +1774,12 @@ static int __init isp116x_probe(struct device *dev)
1774/* 1774/*
1775 Suspend of platform device 1775 Suspend of platform device
1776*/ 1776*/
1777static int isp116x_suspend(struct device *dev, pm_message_t state, u32 phase) 1777static int isp116x_suspend(struct device *dev, pm_message_t state)
1778{ 1778{
1779 int ret = 0; 1779 int ret = 0;
1780 struct usb_hcd *hcd = dev_get_drvdata(dev); 1780 struct usb_hcd *hcd = dev_get_drvdata(dev);
1781 1781
1782 VDBG("%s: state %x, phase %x\n", __func__, state, phase); 1782 VDBG("%s: state %x\n", __func__, state);
1783
1784 if (phase != SUSPEND_DISABLE && phase != SUSPEND_POWER_DOWN)
1785 return 0;
1786 1783
1787 ret = usb_suspend_device(hcd->self.root_hub, state); 1784 ret = usb_suspend_device(hcd->self.root_hub, state);
1788 if (!ret) { 1785 if (!ret) {
@@ -1797,15 +1794,12 @@ static int isp116x_suspend(struct device *dev, pm_message_t state, u32 phase)
1797/* 1794/*
1798 Resume platform device 1795 Resume platform device
1799*/ 1796*/
1800static int isp116x_resume(struct device *dev, u32 phase) 1797static int isp116x_resume(struct device *dev)
1801{ 1798{
1802 int ret = 0; 1799 int ret = 0;
1803 struct usb_hcd *hcd = dev_get_drvdata(dev); 1800 struct usb_hcd *hcd = dev_get_drvdata(dev);
1804 1801
1805 VDBG("%s: state %x, phase %x\n", __func__, dev->power.power_state, 1802 VDBG("%s: state %x\n", __func__, dev->power.power_state);
1806 phase);
1807 if (phase != RESUME_POWER_ON)
1808 return 0;
1809 1803
1810 ret = usb_resume_device(hcd->self.root_hub); 1804 ret = usb_resume_device(hcd->self.root_hub);
1811 if (!ret) { 1805 if (!ret) {