13/34: cdrom/mcd: remove sleep_on() usage
PATCH 4/6 13/34: cdrom/mcd: remove sleep_on() usage
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 <[email protected]>
Signed-off-by Domen Puncer <[email protected]>
---
kj-domen/drivers/cdrom/mcd.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletion(-)
drivers/cdrom/mcd.c renamed from drivers/cdrom/mcd.c~sleep_on-drivers_cdrom_mcd +5 -1
@@ -95,6 +95,7 @@#include <linux/delay.h> #include <linux/init.h> #include <linux/config.h> +#include <linux/wait.h> /* #define REALLY_SLOW_IO */ #include <asm/system.h>
@@ -1273,11 +1274,14 @@ static void mcdStatTimer(unsigned long dstatic int getMcdStatus (int timeout) {int st; +DEFINE_WAIT (wait); +prepare_to_wait (&mcd_waitq, &wait,TASK_UNINTERRUPTIBLE ); McdTimeout = timeout; mcd_timer.function = mcdStatTimer;mod_timer (&mcd_timer, jiffies +1 ); -sleep_on (&mcd_waitq); +schedule (); +finish_wait (&mcd_waitq, &wait);if (McdTimeout <=0 )return -1 ;
_