• Xiaotian Feng's avatar
    PM: Reset transition_started at dpm_resume_noirq · 3eb132c9
    Xiaotian Feng authored
    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: default avatarXiaotian Feng <dfeng@redhat.com>
    Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
    3eb132c9
main.c 20.2 KB