* [patch 4/6] 13/34: cdrom/mcd: remove sleep_on() usage
@ 2005-03-06 10:32 domen
0 siblings, 0 replies; only message in thread
From: domen @ 2005-03-06 10:32 UTC (permalink / raw)
To: emoenke; +Cc: linux-kernel, domen, nacc
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>
---
kj-domen/drivers/cdrom/mcd.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletion(-)
diff -puN drivers/cdrom/mcd.c~sleep_on-drivers_cdrom_mcd drivers/cdrom/mcd.c
--- kj/drivers/cdrom/mcd.c~sleep_on-drivers_cdrom_mcd 2005-03-05 16:11:47.000000000 +0100
+++ kj-domen/drivers/cdrom/mcd.c 2005-03-05 16:11:47.000000000 +0100
@@ -95,6 +95,7 @@
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/config.h>
+#include <linux/wait.h>
/* #define REALLY_SLOW_IO */
#include <asm/system.h>
@@ -1273,11 +1274,14 @@ static void mcdStatTimer(unsigned long d
static int getMcdStatus(int timeout)
{
int st;
+ DEFINE_WAIT(wait);
+ prepare_to_wait(&mcd_waitq, &wait, TASK_UNINTERRUPTIBLE);
McdTimeout = timeout;
mcd_timer.function = mcdStatTimer;
mod_timer(&mcd_timer, jiffies + 1);
- sleep_on(&mcd_waitq);
+ schedule();
+ finish_wait(&mcd_waitq, &wait);
if (McdTimeout <= 0)
return -1;
_
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-03-06 10:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-06 10:32 [patch 4/6] 13/34: cdrom/mcd: remove sleep_on() usage domen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox