From: Stephen Rothwell on
Hi Greg,

Today's linux-next merge of the driver-core tree got a conflict in
drivers/base/power/main.c between commit
de20f9bde404252647645f9f948c8c5de16cc51d ("PM: Asynchronous suspend and
resume of devices") from the suspend tree and commit
df5a0aec4591ae8a5deb67bc8cb6be3d0812abb2 ("drivers/base: Convert dev->sem
to mutex") from the driver-core tree.

I fixed it up (see below) and can carry the fix as necessary.
--
Cheers,
Stephen Rothwell sfr(a)canb.auug.org.au

diff --cc drivers/base/power/main.c
index 0e26a6f,05848a9..0000000
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@@ -507,11 -476,8 +507,11 @@@ static int device_resume(struct device
TRACE_DEVICE(dev);
TRACE_RESUME(0);

+ dpm_wait(dev->parent, async);
- down(&dev->sem);
+ mutex_lock(&dev->mutex);

+ dev->power.status = DPM_RESUMING;
+
if (dev->bus) {
if (dev->bus->pm) {
pm_dev_dbg(dev, state, "");
@@@ -543,8 -509,7 +543,8 @@@
}
}
End:
- up(&dev->sem);
+ mutex_unlock(&dev->mutex);
+ complete_all(&dev->power.completion);

TRACE_RESUME(error);
return error;
@@@ -808,12 -740,8 +808,12 @@@ static int __device_suspend(struct devi
{
int error = 0;

+ dpm_wait_for_children(dev, async);
- down(&dev->sem);
+ mutex_lock(&dev->mutex);

+ if (async_error)
+ goto End;
+
if (dev->class) {
if (dev->class->pm) {
pm_dev_dbg(dev, state, "class ");
@@@ -844,13 -772,8 +844,13 @@@
error = legacy_suspend(dev, state, dev->bus->suspend);
}
}
+
+ if (!error)
+ dev->power.status = DPM_OFF;
+
End:
- up(&dev->sem);
+ mutex_unlock(&dev->mutex);
+ complete_all(&dev->power.completion);

return error;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/