aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/power/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/power/main.c')
-rw-r--r--drivers/base/power/main.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index 5630af302b2f..c4568b82875b 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -50,7 +50,6 @@
50LIST_HEAD(dpm_active); 50LIST_HEAD(dpm_active);
51static LIST_HEAD(dpm_off); 51static LIST_HEAD(dpm_off);
52static LIST_HEAD(dpm_off_irq); 52static LIST_HEAD(dpm_off_irq);
53static LIST_HEAD(dpm_destroy);
54 53
55static DEFINE_MUTEX(dpm_list_mtx); 54static DEFINE_MUTEX(dpm_list_mtx);
56 55
@@ -104,24 +103,6 @@ void device_pm_remove(struct device *dev)
104 mutex_unlock(&dpm_list_mtx); 103 mutex_unlock(&dpm_list_mtx);
105} 104}
106 105
107/**
108 * device_pm_schedule_removal - schedule the removal of a suspended device
109 * @dev: Device to destroy
110 *
111 * Moves the device to the dpm_destroy list for further processing by
112 * unregister_dropped_devices().
113 */
114void device_pm_schedule_removal(struct device *dev)
115{
116 pr_debug("PM: Preparing for removal: %s:%s\n",
117 dev->bus ? dev->bus->name : "No Bus",
118 kobject_name(&dev->kobj));
119 mutex_lock(&dpm_list_mtx);
120 list_move_tail(&dev->power.entry, &dpm_destroy);
121 mutex_unlock(&dpm_list_mtx);
122}
123EXPORT_SYMBOL_GPL(device_pm_schedule_removal);
124
125/*------------------------- Resume routines -------------------------*/ 106/*------------------------- Resume routines -------------------------*/
126 107
127/** 108/**
@@ -246,26 +227,6 @@ static void dpm_resume(void)
246} 227}
247 228
248/** 229/**
249 * unregister_dropped_devices - Unregister devices scheduled for removal
250 *
251 * Unregister all devices on the dpm_destroy list.
252 */
253static void unregister_dropped_devices(void)
254{
255 mutex_lock(&dpm_list_mtx);
256 while (!list_empty(&dpm_destroy)) {
257 struct list_head *entry = dpm_destroy.next;
258 struct device *dev = to_device(entry);
259
260 mutex_unlock(&dpm_list_mtx);
261 /* This also removes the device from the list */
262 device_unregister(dev);
263 mutex_lock(&dpm_list_mtx);
264 }
265 mutex_unlock(&dpm_list_mtx);
266}
267
268/**
269 * device_resume - Restore state of each device in system. 230 * device_resume - Restore state of each device in system.
270 * 231 *
271 * Resume all the devices, unlock them all, and allow new 232 * Resume all the devices, unlock them all, and allow new
@@ -275,7 +236,6 @@ void device_resume(void)
275{ 236{
276 might_sleep(); 237 might_sleep();
277 dpm_resume(); 238 dpm_resume();
278 unregister_dropped_devices();
279} 239}
280EXPORT_SYMBOL_GPL(device_resume); 240EXPORT_SYMBOL_GPL(device_resume);
281 241