[PATCH] ps2esdi: replace sleep_on() with wait_event() From: Nishanth Aravamudan 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 Signed-off-by: Domen Puncer Signed-off-by: Alexey Dobriyan Index: linux-kj/drivers/block/ps2esdi.c =================================================================== --- linux-kj.orig/drivers/block/ps2esdi.c 2005-10-28 16:25:14.000000000 +0400 +++ linux-kj/drivers/block/ps2esdi.c 2005-10-28 16:26:22.000000000 +0400 @@ -43,6 +43,7 @@ #include #include #include +#include #include #include @@ -460,8 +461,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 */ @@ -469,8 +469,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; }