]> git.baikalelectronics.ru Git - kernel.git/commit
PM: Acquire device locks on suspend
authorRafael J. Wysocki <rjw@sisk.pl>
Sat, 12 Jan 2008 19:40:46 +0000 (20:40 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 25 Jan 2008 04:40:04 +0000 (20:40 -0800)
commit2f8c7899099dfde8c27abff6a45e0e400dcc8f3b
tree09e91c89228c8d3c6928a1b2ef56711190c69836
parentddac791b78ea155a1a24ad66b16f831c6e24f613
PM: Acquire device locks on suspend

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: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kernel/cpuid.c
arch/x86/kernel/msr.c
drivers/base/core.c
drivers/base/power/main.c
drivers/base/power/power.h
include/linux/device.h