]> git.hungrycats.org Git - linux/commitdiff
[media] gscpa_m5602: use msecs_to_jiffies for conversions
authorNicholas Mc Guire <hofrat@osadl.org>
Sun, 7 Jun 2015 14:34:40 +0000 (11:34 -0300)
committerJiri Slaby <jslaby@suse.cz>
Wed, 28 Oct 2015 15:38:34 +0000 (16:38 +0100)
commit 63f2f417526fc54191f2b813f72dc1d5322bede8 upstream.

API compliance scanning with coccinelle flagged:
./drivers/media/usb/gspca/m5602/m5602_s5k83a.c:180:9-25:
 WARNING: timeout (100) seems HZ dependent

Numeric constants passed to schedule_timeout() make the effective
timeout HZ dependent which makes little sense in a polling loop for
the cameras rotation state.
Fixed up by converting the constant to jiffies with msecs_to_jiffies()

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Oliver Neukum <ONeukum@suse.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/media/usb/gspca/m5602/m5602_s5k83a.c

index 7cbc3a00bda87208cd65b5ad9e105b2aa54cf1a2..bf6b215438e380f49ad120c3d9d6934763737920 100644 (file)
@@ -177,7 +177,7 @@ static int rotation_thread_function(void *data)
        __s32 vflip, hflip;
 
        set_current_state(TASK_INTERRUPTIBLE);
-       while (!schedule_timeout(100)) {
+       while (!schedule_timeout(msecs_to_jiffies(100))) {
                if (mutex_lock_interruptible(&sd->gspca_dev.usb_lock))
                        break;