提交 3eb132c9 编写于 作者: X Xiaotian Feng 提交者: Rafael J. Wysocki

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: NXiaotian Feng <dfeng@redhat.com>
Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
上级 20d652d7
...@@ -365,6 +365,7 @@ void dpm_resume_noirq(pm_message_t state) ...@@ -365,6 +365,7 @@ void dpm_resume_noirq(pm_message_t state)
struct device *dev; struct device *dev;
mutex_lock(&dpm_list_mtx); mutex_lock(&dpm_list_mtx);
transition_started = false;
list_for_each_entry(dev, &dpm_list, power.entry) list_for_each_entry(dev, &dpm_list, power.entry)
if (dev->power.status > DPM_OFF) { if (dev->power.status > DPM_OFF) {
int error; int error;
...@@ -443,7 +444,6 @@ static void dpm_resume(pm_message_t state) ...@@ -443,7 +444,6 @@ static void dpm_resume(pm_message_t state)
INIT_LIST_HEAD(&list); INIT_LIST_HEAD(&list);
mutex_lock(&dpm_list_mtx); mutex_lock(&dpm_list_mtx);
transition_started = false;
while (!list_empty(&dpm_list)) { while (!list_empty(&dpm_list)) {
struct device *dev = to_device(dpm_list.next); struct device *dev = to_device(dpm_list.next);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册