[PATCH] drivers/cdrom/optcd.c: remove sleep_on() From: Rick Lavoie Usage of sleep_on() is depricated. Replace with wait_event(), checking the condition which triggers the wake-up to avoid race conditions. Signed-of-by: Rick Lavoie Signed-off-by: Alexey Dobriyan Index: linux-kj/drivers/cdrom/optcd.c =================================================================== --- linux-kj.orig/drivers/cdrom/optcd.c 2006-01-18 02:21:18.000000000 +0300 +++ linux-kj/drivers/cdrom/optcd.c 2006-01-18 16:46:36.000000000 +0300 @@ -292,7 +292,7 @@ static int sleep_flag_low(int flag, unsi flag_high = inb(STATUS_PORT) & flag; if (flag_high && sleep_timeout > 0) { mod_timer(&delay_timer, jiffies + HZ/100); - sleep_on(&waitq); + wait_event(waitq, ((inb(STATUS_PORT) & FL_STDT) != FL_STDT || sleep_timeout <= 0)); flag_high = inb(STATUS_PORT) & flag; }