Thread (1 message) 1 message, 1 author, 2008-01-02

Re: [PATCH 1/4] PM: Introduce destroy_suspended_device()

From: Alan Stern <stern@rowland.harvard.edu>
Date: 2008-01-02 16:41:36

On Wed, 2 Jan 2008, Rafael J. Wysocki wrote:
On Wednesday, 2 of January 2008, Rafael J. Wysocki wrote:
quoted
From: Rafael J. Wysocki <redacted>

It sometimes is necessary to destroy a device object during a suspend or
hibernation, but the PM core is supposed to control all device objects in that
cases.  For this reason, it is necessary to introduce a mechanism allowing one
to ask the PM core to remove a device object corresponding to a suspended
device on one's behalf.

Define function destroy_suspended_device() that will schedule the removal of
a device object corresponding to a suspended device by the PM core during the
subsequent resume.

Signed-off-by: Rafael J. Wysocki <redacted>
Sorry, a small fix is needed for this patch.  Namely, dpm_sysfs_remove(dev)
should not be called by device_pm_schedule_removal(), because it will be called
anyway from device_pm_remove() when the device object is finally unregistered
(we're talking here about unlikely error paths only, but still).
The situation is a little confusing, because the source files under 
drivers/base/power are maintained in Greg's tree and he already has 
gregkh-driver-pm-acquire-device-locks-prior-to-suspending.patch 
installed.  That patch conflicts with this one.

One of the these two patches will have to be rewritten to apply on top 
of the other.  Which do you think should be changed?

Alan Stern
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help