summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorNicholas Mc Guire <hofrat@osadl.org>2015-05-27 18:34:47 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-06-01 10:29:50 +0900
commitfdd2db290d9bdfe11c6ee408f8727f1211f720d5 (patch)
tree6b3adfa030165be16395885c49289dd483d9fac6 /drivers/char
parent0e4a566b9e5c7361c31b939649015e13f066fc38 (diff)
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>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/snsc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/snsc.c b/drivers/char/snsc.c
index 8bab59292a0d..8a80ead8d316 100644
--- a/drivers/char/snsc.c
+++ b/drivers/char/snsc.c
@@ -198,7 +198,7 @@ scdrv_read(struct file *file, char __user *buf, size_t count, loff_t *f_pos)
add_wait_queue(&sd->sd_rq, &wait);
spin_unlock_irqrestore(&sd->sd_rlock, flags);
- schedule_timeout(SCDRV_TIMEOUT);
+ schedule_timeout(msecs_to_jiffies(SCDRV_TIMEOUT));
remove_wait_queue(&sd->sd_rq, &wait);
if (signal_pending(current)) {
@@ -294,7 +294,7 @@ scdrv_write(struct file *file, const char __user *buf,
add_wait_queue(&sd->sd_wq, &wait);
spin_unlock_irqrestore(&sd->sd_wlock, flags);
- schedule_timeout(SCDRV_TIMEOUT);
+ schedule_timeout(msecs_to_jiffies(SCDRV_TIMEOUT));
remove_wait_queue(&sd->sd_wq, &wait);
if (signal_pending(current)) {