aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/power
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/power')
-rw-r--r--drivers/base/power/suspend.c27
1 files changed, 0 insertions, 27 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 *