Hi, Please consider applying. Description: Use wait_event() instead of the deprecated sleep_on() function. The second replacement is more difficult, as there are various conditions which may cause the while-loop to break, each resulting in a different effect. Signed-off-by: Nishanth Aravamudan Signed-off-by: Domen Puncer --- kj-domen/drivers/scsi/atari_scsi.c | 31 ++++++++++++++----------------- 1 files changed, 14 insertions(+), 17 deletions(-) diff -puN drivers/scsi/atari_scsi.c~wait_event-drivers_scsi_atari_scsi drivers/scsi/atari_scsi.c --- kj/drivers/scsi/atari_scsi.c~wait_event-drivers_scsi_atari_scsi 2005-01-23 00:24:36.000000000 +0100 +++ kj-domen/drivers/scsi/atari_scsi.c 2005-01-23 00:24:36.000000000 +0100 @@ -67,6 +67,7 @@ #include #include +#include #define NDEBUG (0) @@ -559,24 +560,20 @@ static void falcon_get_lock( void ) local_irq_save(flags); - while( !in_interrupt() && falcon_got_lock && stdma_others_waiting() ) - sleep_on( &falcon_fairness_wait ); - - while (!falcon_got_lock) { - if (in_interrupt()) - panic( "Falcon SCSI hasn't ST-DMA lock in interrupt" ); - if (!falcon_trying_lock) { - falcon_trying_lock = 1; - stdma_lock(scsi_falcon_intr, NULL); - falcon_got_lock = 1; - falcon_trying_lock = 0; - wake_up( &falcon_try_wait ); - } - else { - sleep_on( &falcon_try_wait ); - } - } + wait_event(falcon_fairness_wait, (in_interrupt() || + falcon_got_lock || stdma_others_waiting())); + wait_event(falcon_try_wait, (in_interrupt() || + falcon_got_lock || !falcon_trying_lock)); + if (in_interrupt()) + panic( "Falcon SCSI hasn't ST-DMA lock in interrupt" ); + if (!falcon_trying_lock) { + falcon_trying_lock = 1; + stdma_lock(scsi_falcon_intr, NULL); + falcon_got_lock = 1; + falcon_trying_lock = 0; + wake_up(&falcon_try_wait); + } local_irq_restore(flags); if (!falcon_got_lock) panic("Falcon SCSI: someone stole the lock :-(\n"); _