From: Yong Zhang <yong.zhang0@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Stelian Pop <stelian@popies.net>,
Michael Hanselmann <linux-kernel@hansmi.ch>
Subject: [PATCH 2/5] hwmon: use DECLARE_COMPLETION_ONSTACK for non-constant completion
Date: Wed, 16 Dec 2009 22:35:58 +0800 [thread overview]
Message-ID: <1260974161-6934-3-git-send-email-yong.zhang0@gmail.com> (raw)
In-Reply-To: <1260974161-6934-2-git-send-email-yong.zhang0@gmail.com>
The _ONSTACK variant should be used for on-stack completion,
otherwise it will break lockdep.
Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Cc: Stelian Pop <stelian@popies.net>
Cc: Michael Hanselmann <linux-kernel@hansmi.ch>
---
drivers/hwmon/ams/ams-pmu.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hwmon/ams/ams-pmu.c b/drivers/hwmon/ams/ams-pmu.c
index fb18b3d..2016629 100644
--- a/drivers/hwmon/ams/ams-pmu.c
+++ b/drivers/hwmon/ams/ams-pmu.c
@@ -52,7 +52,7 @@ static void ams_pmu_req_complete(struct adb_request *req)
static void ams_pmu_set_register(u8 reg, u8 value)
{
static struct adb_request req;
- DECLARE_COMPLETION(req_complete);
+ DECLARE_COMPLETION_ONSTACK(req_complete);
req.arg = &req_complete;
if (pmu_request(&req, ams_pmu_req_complete, 4, ams_pmu_cmd, 0x00, reg, value))
@@ -65,7 +65,7 @@ static void ams_pmu_set_register(u8 reg, u8 value)
static u8 ams_pmu_get_register(u8 reg)
{
static struct adb_request req;
- DECLARE_COMPLETION(req_complete);
+ DECLARE_COMPLETION_ONSTACK(req_complete);
req.arg = &req_complete;
if (pmu_request(&req, ams_pmu_req_complete, 3, ams_pmu_cmd, 0x01, reg))
--
1.6.3.3
next prev parent reply other threads:[~2009-12-16 14:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-16 14:35 [PATCH 0/5] " Yong Zhang
2009-12-16 14:35 ` [PATCH 1/5] powerpc/iseries: " Yong Zhang
2009-12-16 14:35 ` Yong Zhang [this message]
2009-12-16 14:35 ` [PATCH 3/5] USB: " Yong Zhang
2009-12-16 14:36 ` [PATCH 4/5] mISDN: " Yong Zhang
2009-12-16 14:36 ` [PATCH 5/5] aha152x: " Yong Zhang
2009-12-16 19:00 ` [PATCH 4/5] mISDN: " Karsten Keil
2009-12-19 4:30 ` David Miller
2009-12-16 15:14 ` [PATCH 0/5] " Américo Wang
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=1260974161-6934-3-git-send-email-yong.zhang0@gmail.com \
--to=yong.zhang0@gmail.com \
--cc=linux-kernel@hansmi.ch \
--cc=linux-kernel@vger.kernel.org \
--cc=stelian@popies.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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
all inboxes | Powered by JetHome®