aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorXiaotian Feng <dfeng@redhat.com>2009-08-20 14:28:33 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2009-09-14 14:27:00 -0400
commit3eb132c986f04f64b9c360abd67a1e0d18d6d5b4 (patch)
treed51e8e2d3d9de0ad365f1f0c4cdcc02aa72b1aaa /drivers/base
parent20d652d7d1c2f202215ecf0306ccecc3569df9ba (diff)
PM: Reset transition_started at dpm_resume_noirq
transition_started should be set once the preparation of devices for a PM has started, reset before starting to resume devices. When resuming devices, kernel calls dpm_resume_noirq then dpm_resume_end(dpm_resume). Thus we should reset transition_started at dpm_resume_noirq. This patch fixes ACPI warning when resuming from suspend/hibernate: ACPI: \_SB_.PCI0.IDE1.PRI1.MAS1 - docking ------------[ cut here ]------------ WARNING: at drivers/base/power/main.c:87 device_pm_add+0x8b/0xcc() Hardware name: OptiPlex 760 Device: acpi Parentless device registered during a PM transaction [rjw: Fixed up the changelog.] Signed-off-by: Xiaotian Feng <dfeng@redhat.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/power/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index b0899118569b..e0dc4071e088 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -365,6 +365,7 @@ void dpm_resume_noirq(pm_message_t state)
365 struct device *dev; 365 struct device *dev;
366 366
367 mutex_lock(&dpm_list_mtx); 367 mutex_lock(&dpm_list_mtx);
368 transition_started = false;
368 list_for_each_entry(dev, &dpm_list, power.entry) 369 list_for_each_entry(dev, &dpm_list, power.entry)
369 if (dev->power.status > DPM_OFF) { 370 if (dev->power.status > DPM_OFF) {
370 int error; 371 int error;
@@ -443,7 +444,6 @@ static void dpm_resume(pm_message_t state)
443 444
444 INIT_LIST_HEAD(&list); 445 INIT_LIST_HEAD(&list);
445 mutex_lock(&dpm_list_mtx); 446 mutex_lock(&dpm_list_mtx);
446 transition_started = false;
447 while (!list_empty(&dpm_list)) { 447 while (!list_empty(&dpm_list)) {
448 struct device *dev = to_device(dpm_list.next); 448 struct device *dev = to_device(dpm_list.next);
449 449