All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] [PATCH] 11/34: cdrom/aztcd: remove sleep_on() usage
@ 2005-01-25 23:10 Nishanth Aravamudan
  0 siblings, 0 replies; only message in thread
From: Nishanth Aravamudan @ 2005-01-25 23:10 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 976 bytes --]

Hi,

Please consider applying.

Description: 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>

--- 2.6.11-rc2-kj-v/drivers/cdrom/aztcd.c	2005-01-24 09:34:04.000000000 -0800
+++ 2.6.11-rc2-kj/drivers/cdrom/aztcd.c	2005-01-25 15:08:34.000000000 -0800
@@ -180,6 +180,7 @@
 #include <linux/ioport.h>
 #include <linux/string.h>
 #include <linux/major.h>
+#include <linux/wait.h>
 
 #include <linux/init.h>
 
@@ -430,9 +431,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);

[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-01-25 23:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-25 23:10 [KJ] [PATCH] 11/34: cdrom/aztcd: remove sleep_on() usage Nishanth Aravamudan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.