mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch 3/6] 11/34: cdrom/aztcd: remove sleep_on() usage
@ 2005-03-06 10:31 domen
  0 siblings, 0 replies; only message in thread
From: domen @ 2005-03-06 10:31 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/aztcd.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)

diff -puN drivers/cdrom/aztcd.c~sleep_on-drivers_cdrom_aztcd drivers/cdrom/aztcd.c
--- kj/drivers/cdrom/aztcd.c~sleep_on-drivers_cdrom_aztcd	2005-03-05 16:11:46.000000000 +0100
+++ kj-domen/drivers/cdrom/aztcd.c	2005-03-05 16:11:46.000000000 +0100
@@ -179,6 +179,7 @@
 #include <linux/ioport.h>
 #include <linux/string.h>
 #include <linux/major.h>
+#include <linux/wait.h>
 
 #include <linux/init.h>
 
@@ -429,9 +430,12 @@ static void dten_low(void)
 #define STEN_LOW_WAIT   statusAzt()
 static void statusAzt(void)
 {
+	DEFINE_WAIT(wait);
 	AztTimeout = AZT_STATUS_DELAY;
 	SET_TIMER(aztStatTimer, HZ / 100);
-	sleep_on(&azt_waitq);
+	prepare_to_wait(&azt_waitq, &wait, TASK_UNINTERRUPTIBLE);
+	schedule();
+	finish_wait(&azt_waitq, &wait);
 	if (AztTimeout <= 0)
 		printk("aztcd: Error Wait STEN_LOW_WAIT command:%x\n",
 		       aztCmd);
_

^ 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:31 [patch 3/6] 11/34: cdrom/aztcd: 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

all inboxes | Powered by JetHome®