From 953f8692136acd6aa9201f9388697a7005756894 Mon Sep 17 00:00:00 2001 From: Gerd Knorr Date: Wed, 22 Sep 2004 11:47:11 +0000 Subject: - misc sleep cleanups. --- linux/drivers/media/video/msp3400-driver.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'linux/drivers/media/video/msp3400-driver.c') diff --git a/linux/drivers/media/video/msp3400-driver.c b/linux/drivers/media/video/msp3400-driver.c index 44287f2bf..74e57e172 100644 --- a/linux/drivers/media/video/msp3400-driver.c +++ b/linux/drivers/media/video/msp3400-driver.c @@ -745,11 +745,11 @@ static int msp34xx_sleep(struct msp3400c *msp, int timeout) add_wait_queue(&msp->wq, &wait); if (!msp->rmmod) { - set_current_state(TASK_INTERRUPTIBLE); - if (timeout < 0) + if (timeout < 0) { + set_current_state(TASK_INTERRUPTIBLE); schedule(); - else - schedule_timeout(timeout); + } else + msleep_interruptible(timeout); } remove_wait_queue(&msp->wq, &wait); return msp->rmmod || signal_pending(current); @@ -818,7 +818,7 @@ static int msp3400c_thread(void *data) } /* some time for the tuner to sync */ - if (msp34xx_sleep(msp,HZ/5)) + if (msp34xx_sleep(msp,200)) goto done; restart: @@ -851,7 +851,7 @@ static int msp3400c_thread(void *data) for (this = 0; this < count; this++) { msp3400c_setcarrier(client, cd[this].cdo,cd[this].cdo); - if (msp34xx_sleep(msp,HZ/10)) + if (msp34xx_sleep(msp,100)) goto done; if (msp->restart) msp->restart = 0; @@ -886,7 +886,7 @@ static int msp3400c_thread(void *data) for (this = 0; this < count; this++) { msp3400c_setcarrier(client, cd[this].cdo,cd[this].cdo); - if (msp34xx_sleep(msp,HZ/10)) + if (msp34xx_sleep(msp,100)) goto done; if (msp->restart) goto restart; @@ -1055,7 +1055,7 @@ static int msp3410d_thread(void *data) } /* some time for the tuner to sync */ - if (msp34xx_sleep(msp,HZ/5)) + if (msp34xx_sleep(msp,200)) goto done; restart: @@ -1114,7 +1114,7 @@ static int msp3410d_thread(void *data) } else { /* triggered autodetect */ for (;;) { - if (msp34xx_sleep(msp,HZ/10)) + if (msp34xx_sleep(msp,100)) goto done; if (msp->restart) goto restart; -- cgit v1.2.3