aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2006-08-30 17:09:47 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-26 00:08:38 -0400
commit1d3a82af45428c5e8deaa119cdeb79611ae46371 (patch)
treee8e5b7a03a979e149541149cab5570352b90656f /drivers
parent1ebfd79eb46a89eacf3cbdf4a463d5d572d3557b (diff)
PM: no suspend_prepare() phase
Remove the new suspend_prepare() phase. It doesn't seem very usable, has never been tested, doesn't address fault cleanup, and would need a sibling resume_complete(); plus there are no real use cases. It could be restored later if those issues get resolved. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/power/suspend.c27
-rw-r--r--drivers/pci/pci-driver.c14
2 files changed, 0 insertions, 41 deletions
diff --git a/drivers/base/power/suspend.c b/drivers/base/power/suspend.c
index e86db83746ac..6453c25103d2 100644
--- a/drivers/base/power/suspend.c
+++ b/drivers/base/power/suspend.c
@@ -118,33 +118,6 @@ static int suspend_device_late(struct device *dev, pm_message_t state)
118} 118}
119 119
120/** 120/**
121 * device_prepare_suspend - save state and prepare to suspend
122 *
123 * NOTE! Devices cannot detach at this point - not only do we
124 * hold the device list semaphores over the whole prepare, but
125 * the whole point is to do non-invasive preparatory work, not
126 * the actual suspend.
127 */
128int device_prepare_suspend(pm_message_t state)
129{
130 int error = 0;
131 struct device * dev;
132
133 down(&dpm_sem);
134 down(&dpm_list_sem);
135 list_for_each_entry_reverse(dev, &dpm_active, power.entry) {
136 if (!dev->bus || !dev->bus->suspend_prepare)
137 continue;
138 error = dev->bus->suspend_prepare(dev, state);
139 if (error)
140 break;
141 }
142 up(&dpm_list_sem);
143 up(&dpm_sem);
144 return error;
145}
146
147/**
148 * device_suspend - Save state and stop all devices in system. 121 * device_suspend - Save state and stop all devices in system.
149 * @state: Power state to put each device in. 122 * @state: Power state to put each device in.
150 * 123 *
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 9e7d6ceb3805..8948ac9ab681 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -264,19 +264,6 @@ static int pci_device_remove(struct device * dev)
264 return 0; 264 return 0;
265} 265}
266 266
267static int pci_device_suspend_prepare(struct device * dev, pm_message_t state)
268{
269 struct pci_dev * pci_dev = to_pci_dev(dev);
270 struct pci_driver * drv = pci_dev->driver;
271 int i = 0;
272
273 if (drv && drv->suspend_prepare) {
274 i = drv->suspend_prepare(pci_dev, state);
275 suspend_report_result(drv->suspend_prepare, i);
276 }
277 return i;
278}
279
280static int pci_device_suspend(struct device * dev, pm_message_t state) 267static int pci_device_suspend(struct device * dev, pm_message_t state)
281{ 268{
282 struct pci_dev * pci_dev = to_pci_dev(dev); 269 struct pci_dev * pci_dev = to_pci_dev(dev);
@@ -544,7 +531,6 @@ struct bus_type pci_bus_type = {
544 .uevent = pci_uevent, 531 .uevent = pci_uevent,
545 .probe = pci_device_probe, 532 .probe = pci_device_probe,
546 .remove = pci_device_remove, 533 .remove = pci_device_remove,
547 .suspend_prepare= pci_device_suspend_prepare,
548 .suspend = pci_device_suspend, 534 .suspend = pci_device_suspend,
549 .suspend_late = pci_device_suspend_late, 535 .suspend_late = pci_device_suspend_late,
550 .resume_early = pci_device_resume_early, 536 .resume_early = pci_device_resume_early,