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

snsc: pass timeout as HZ independent value

schedule_timeout takes a timeout in jiffies but the code currently is
passing in a constant SCDRV_TIMEOUT which makes this timeout HZ
dependent, so pass it through msecs_to_jiffies() to fix this up.

patch was compile tested with generic_defconfig (implies CONFIG_SGI_SNSC=y)

Patch is against 4.0-rc5 (localversion-next is -next-20150527)

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Nicholas Mc Guire and committed by
Greg Kroah-Hartman
fdd2db29 0e4a566b

+2 -2
+2 -2
drivers/char/snsc.c
··· 198 198 add_wait_queue(&sd->sd_rq, &wait); 199 199 spin_unlock_irqrestore(&sd->sd_rlock, flags); 200 200 201 - schedule_timeout(SCDRV_TIMEOUT); 201 + schedule_timeout(msecs_to_jiffies(SCDRV_TIMEOUT)); 202 202 203 203 remove_wait_queue(&sd->sd_rq, &wait); 204 204 if (signal_pending(current)) { ··· 294 294 add_wait_queue(&sd->sd_wq, &wait); 295 295 spin_unlock_irqrestore(&sd->sd_wlock, flags); 296 296 297 - schedule_timeout(SCDRV_TIMEOUT); 297 + schedule_timeout(msecs_to_jiffies(SCDRV_TIMEOUT)); 298 298 299 299 remove_wait_queue(&sd->sd_wq, &wait); 300 300 if (signal_pending(current)) {