aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/vt
diff options
context:
space:
mode:
authorNicholas Mc Guire <hofrat@osadl.org>2015-02-09 10:54:10 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-06 22:02:26 -0500
commit3372ec28622083ac87daf18918a222fbee06f6f9 (patch)
tree15abebced96ef63405721de74c34c64f97052f3c /drivers/tty/vt
parent678afb9aa8cf2002160c1a56cef5c90df6dc285e (diff)
vt: use msecs_to_jiffies for time conversion
Converting milliseconds to jiffies by "val * HZ / 1000" is technically OK but msecs_to_jiffies(val) is the cleaner solution and handles all corner cases correctly. This is a minor API consolidation only and should make things more readable. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/vt')
-rw-r--r--drivers/tty/vt/vt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 57ed647658be..edf17b4e385f 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -1573,7 +1573,7 @@ static void setterm_command(struct vc_data *vc)
1573 case 11: /* set bell duration in msec */ 1573 case 11: /* set bell duration in msec */
1574 if (vc->vc_npar >= 1) 1574 if (vc->vc_npar >= 1)
1575 vc->vc_bell_duration = (vc->vc_par[1] < 2000) ? 1575 vc->vc_bell_duration = (vc->vc_par[1] < 2000) ?
1576 vc->vc_par[1] * HZ / 1000 : 0; 1576 msecs_to_jiffies(vc->vc_par[1]) : 0;
1577 else 1577 else
1578 vc->vc_bell_duration = DEFAULT_BELL_DURATION; 1578 vc->vc_bell_duration = DEFAULT_BELL_DURATION;
1579 break; 1579 break;