]> git.hungrycats.org Git - linux/commitdiff
[PATCH] zoran ioctl sleeping fixes.
authorDave Jones <davej@codemonkey.org.uk>
Wed, 8 Jan 2003 10:55:05 +0000 (02:55 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Wed, 8 Jan 2003 10:55:05 +0000 (02:55 -0800)
From 2.4

drivers/media/video/zr36067.c

index 70478175aaee6bfa2c96441dc20c58641d280af0..837aa11651f08745abead8f33ca50643a2db95b9 100644 (file)
@@ -4158,7 +4158,6 @@ static int do_zoran_ioctl(struct zoran *zr, unsigned int cmd,
                {
                        struct zoran_status bs;
                        int norm, input, status;
-                       unsigned long timeout;
 
                        if (zr->codec_mode != BUZ_MODE_IDLE) {
                                DEBUG1(printk(KERN_ERR
@@ -4204,9 +4203,8 @@ static int do_zoran_ioctl(struct zoran *zr, unsigned int cmd,
 
                        /* sleep 1 second */
 
-                       timeout = jiffies + 1 * HZ;
-                       while (jiffies < timeout)
-                               schedule();
+                       set_current_state(TASK_UNINTERRUPTIBLE);
+                       schedule_timeout(HZ);
 
                        /* Get status of video decoder */