diff options
author | Nicholas Mc Guire <hofrat@osadl.org> | 2015-02-09 16:53:25 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-07 04:02:26 +0100 |
commit | 4c0d9b17d1c0608bbbef6d00e68956de2c3b1f8e (patch) | |
tree | 3e8a2ee2f7ad5682be247e4bc40c52d5ef76ac52 /drivers/tty/vt | |
parent | serial/8250_dw: use platform_get_irq() instead of platform_get_resource() (diff) | |
download | linux-4c0d9b17d1c0608bbbef6d00e68956de2c3b1f8e.tar.xz linux-4c0d9b17d1c0608bbbef6d00e68956de2c3b1f8e.zip |
vt: vt_ioctl: 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/vt')
-rw-r--r-- | drivers/tty/vt/vt_ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c index 2bd78e2ac8ec..97d5a74558a3 100644 --- a/drivers/tty/vt/vt_ioctl.c +++ b/drivers/tty/vt/vt_ioctl.c @@ -388,7 +388,7 @@ int vt_ioctl(struct tty_struct *tty, * Generate the tone for the appropriate number of ticks. * If the time is zero, turn off sound ourselves. */ - ticks = HZ * ((arg >> 16) & 0xffff) / 1000; + ticks = msecs_to_jiffies((arg >> 16) & 0xffff); count = ticks ? (arg & 0xffff) : 0; if (count) count = PIT_TICK_RATE / count; |