mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch 21/21]  media/zoran_driver:  replace schedule_timeout() with ssleep()
@ 2004-09-23 20:32 janitor
  0 siblings, 0 replies; only message in thread
From: janitor @ 2004-09-23 20:32 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, janitor, nacc




Any comments would be appreciated.

Description: Use ssleep() instead of schedule_timeout()
to guarantee the task delays as expected.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>

Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
---

 linux-2.6.9-rc2-bk7-max/drivers/media/video/zoran_driver.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff -puN drivers/media/video/zoran_driver.c~ssleep-drivers_media_video_zoran_driver drivers/media/video/zoran_driver.c
--- linux-2.6.9-rc2-bk7/drivers/media/video/zoran_driver.c~ssleep-drivers_media_video_zoran_driver	2004-09-21 21:17:34.000000000 +0200
+++ linux-2.6.9-rc2-bk7-max/drivers/media/video/zoran_driver.c	2004-09-21 21:17:34.000000000 +0200
@@ -1917,8 +1917,7 @@ zoran_set_norm (struct zoran *zr,
 		decoder_command(zr, DECODER_SET_NORM, &norm);
 
 		/* let changes come into effect */
-		current->state = TASK_UNINTERRUPTIBLE;
-		schedule_timeout(2 * HZ);
+		ssleep(2);
 
 		decoder_command(zr, DECODER_GET_STATUS, &status);
 		if (!(status & DECODER_STATUS_GOOD)) {
@@ -2639,8 +2638,7 @@ zoran_do_ioctl (struct inode *inode,
 		decoder_command(zr, DECODER_SET_NORM, &norm);
 
 		/* sleep 1 second */
-		current->state = TASK_UNINTERRUPTIBLE;
-		schedule_timeout(1 * HZ);
+		ssleep(1);
 
 		/* Get status of video decoder */
 		decoder_command(zr, DECODER_GET_STATUS, &status);
_

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-09-23 20:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-23 20:32 [patch 21/21] media/zoran_driver: replace schedule_timeout() with ssleep() janitor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®