Skip to content
  • Rafael J. Wysocki's avatar
    PM: Acquire device locks on suspend · 775b64d2
    Rafael J. Wysocki authored
    
    
    This patch reorganizes the way suspend and resume notifications are
    sent to drivers.  The major changes are that now the PM core acquires
    every device semaphore before calling the methods, and calls to
    device_add() during suspends will fail, while calls to device_del()
    during suspends will block.
    
    It also provides a way to safely remove a suspended device with the
    help of the PM core, by using the device_pm_schedule_removal() callback
    introduced specifically for this purpose, and updates two drivers (msr
    and cpuid) that need to use it.
    
    Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
    Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    775b64d2