Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] gscpa_m5602: use msecs_to_jiffies for conversions

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>

authored by

Nicholas Mc Guire and committed by
Mauro Carvalho Chehab
63f2f417 0a2a89c4

+1 -1
+1 -1
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
··· 177 177 __s32 vflip, hflip; 178 178 179 179 set_current_state(TASK_INTERRUPTIBLE); 180 - while (!schedule_timeout(100)) { 180 + while (!schedule_timeout(msecs_to_jiffies(100))) { 181 181 if (mutex_lock_interruptible(&sd->gspca_dev.usb_lock)) 182 182 break; 183 183