* [KJ] [PATCH 4/40] block/ps2esdi: replace sleep_on() with
@ 2005-01-20 18:23 Nishanth Aravamudan
0 siblings, 0 replies; only message in thread
From: Nishanth Aravamudan @ 2005-01-20 18:23 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1364 bytes --]
Hi,
Please consider applying.
Description: Use wait_event() instead of the deprecated sleep_on(). In all
replacements, wait_event() expects the condition to *stop* on, so the existing
conditional is negated and passed as the parameter. I am not sure if these
changes are appropriate, as the condition to pass to wait_event() to guarantee
the same behavior; I think this is the best choice, though.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- 2.6.11-rc1-kj-v/drivers/block/ps2esdi.c 2005-01-15 16:55:43.000000000 -0800
+++ 2.6.11-rc1-kj/drivers/block/ps2esdi.c 2005-01-19 17:55:55.000000000 -0800
@@ -43,6 +43,7 @@
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/module.h>
+#include <linux/delay.h>
#include <asm/system.h>
#include <asm/io.h>
@@ -461,8 +462,7 @@ static void __init ps2esdi_get_device_cf
cmd_blk[1] = 0;
no_int_yet = TRUE;
ps2esdi_out_cmd_blk(cmd_blk);
- if (no_int_yet)
- sleep_on(&ps2esdi_int);
+ wait_event(ps2esdi_int, !no_int_yet);
if (ps2esdi_drives > 1) {
printk("%s: Drive 1\n", DEVICE_NAME); /*BA */
@@ -470,8 +470,7 @@ static void __init ps2esdi_get_device_cf
cmd_blk[1] = 0;
no_int_yet = TRUE;
ps2esdi_out_cmd_blk(cmd_blk);
- if (no_int_yet)
- sleep_on(&ps2esdi_int);
+ wait_event(ps2esdi_int, !no_int_yet);
} /* if second physical drive is present */
return;
}
[-- 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-20 18:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-20 18:23 [KJ] [PATCH 4/40] block/ps2esdi: replace sleep_on() with 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.