]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
V4L/DVB (13003): Correct dangerous and inefficient msecs_to_jiffies() calculation...
authorAndreas Mohr <andi@lisas.de>
Mon, 14 Sep 2009 22:13:29 +0000 (19:13 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 19 Sep 2009 03:52:18 +0000 (00:52 -0300)
Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/et61x251/et61x251_core.c
drivers/media/video/sn9c102/sn9c102_core.c
drivers/media/video/zc0301/zc0301_core.c

index d1c1e457f0b95a937a135920d07b1b474317dc3f..74092f436be61103e8817fb1c95e04249d6a4207 100644 (file)
@@ -1379,8 +1379,10 @@ et61x251_read(struct file* filp, char __user * buf,
                            (!list_empty(&cam->outqueue)) ||
                            (cam->state & DEV_DISCONNECTED) ||
                            (cam->state & DEV_MISCONFIGURED),
-                           cam->module_param.frame_timeout *
-                           1000 * msecs_to_jiffies(1) );
+                           msecs_to_jiffies(
+                               cam->module_param.frame_timeout * 1000
+                           )
+                         );
                if (timeout < 0) {
                        mutex_unlock(&cam->fileop_mutex);
                        return timeout;
index 23edfdc4d4bcafb8230e5924d0773381eea01dc3..9d84c94e8a404ae9f050b850f910c89d167c2d57 100644 (file)
@@ -1954,8 +1954,10 @@ sn9c102_read(struct file* filp, char __user * buf, size_t count, loff_t* f_pos)
                                    (!list_empty(&cam->outqueue)) ||
                                    (cam->state & DEV_DISCONNECTED) ||
                                    (cam->state & DEV_MISCONFIGURED),
-                                   cam->module_param.frame_timeout *
-                                   1000 * msecs_to_jiffies(1) );
+                                   msecs_to_jiffies(
+                                       cam->module_param.frame_timeout * 1000
+                                   )
+                                 );
                        if (timeout < 0) {
                                mutex_unlock(&cam->fileop_mutex);
                                return timeout;
index 96971044fc78cb767815179b556fe30c4c20a4e8..b3c6436b33ba6ddf9b8515a0e7f5011ec40e9402 100644 (file)
@@ -819,8 +819,10 @@ zc0301_read(struct file* filp, char __user * buf, size_t count, loff_t* f_pos)
                            (!list_empty(&cam->outqueue)) ||
                            (cam->state & DEV_DISCONNECTED) ||
                            (cam->state & DEV_MISCONFIGURED),
-                           cam->module_param.frame_timeout *
-                           1000 * msecs_to_jiffies(1) );
+                           msecs_to_jiffies(
+                               cam->module_param.frame_timeout * 1000
+                           )
+                         );
                if (timeout < 0) {
                        mutex_unlock(&cam->fileop_mutex);
                        return timeout;