From: domen@coderock.org
To: axboe@suse.de
Cc: linux-kernel@vger.kernel.org,
Nishanth Aravamudan <nacc@us.ibm.com>,
domen@coderock.org
Subject: [patch 07/12] block/xd: remove sleep_on() usage
Date: Mon, 20 Jun 2005 23:51:37 +0200 [thread overview]
Message-ID: <20050620215136.112146000@nd47.coderock.org> (raw)
[-- Attachment #1: sleep_on-drivers_block_xd.patch --]
[-- Type: text/plain, Size: 1050 bytes --]
From: Nishanth Aravamudan <nacc@us.ibm.com>
Directly use wait-queues instead of the deprecated sleep_on().
This required adding a local waitqueue. Patch is compile-tested.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Domen Puncer <domen@coderock.org>
---
xd.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletion(-)
Index: quilt/drivers/block/xd.c
===================================================================
--- quilt.orig/drivers/block/xd.c
+++ quilt/drivers/block/xd.c
@@ -538,6 +538,7 @@ static inline u_char xd_waitport (u_shor
static inline u_int xd_wait_for_IRQ (void)
{
+ DEFINE_WAIT(wait);
unsigned long flags;
xd_watchdog_int.expires = jiffies + 8 * HZ;
add_timer(&xd_watchdog_int);
@@ -546,7 +547,9 @@ static inline u_int xd_wait_for_IRQ (voi
enable_dma(xd_dma);
release_dma_lock(flags);
- sleep_on(&xd_wait_int);
+ prepare_to_wait(&xd_wait_int, &wait, TASK_UNINTERRUPTIBLE);
+ schedule();
+ finish_wait(&xd_wait_int, &wait);
del_timer(&xd_watchdog_int);
xdc_busy = 0;
--
reply other threads:[~2005-06-21 6:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20050620215136.112146000@nd47.coderock.org \
--to=domen@coderock.org \
--cc=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=nacc@us.ibm.com \
/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