From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Greg KH <greg@kroah•com>
Cc: linux-next@vger•kernel.org, linux-kernel@vger•kernel.org,
Thomas Gleixner <tglx@linutronix•de>,
"Rafael J. Wysocki" <rjw@sisk•pl>
Subject: linux-next: manual merge of the driver-core tree with the suspend tree
Date: Tue, 2 Feb 2010 17:01:55 +1100 [thread overview]
Message-ID: <20100202170155.0fa4ce45.sfr@canb.auug.org.au> (raw)
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@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;
}
next reply other threads:[~2010-02-02 6:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-02 6:01 Stephen Rothwell [this message]
2010-02-02 15:22 ` linux-next: manual merge of the driver-core tree with the suspend tree Greg KH
-- strict thread matches above, loose matches on Subject: below --
2010-02-18 8:59 Stephen Rothwell
2010-02-19 1:19 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100202170155.0fa4ce45.sfr@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=greg@kroah$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=rjw@sisk$(echo .)pl \
--cc=tglx@linutronix$(echo .)de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox