diff options
Diffstat (limited to 'drivers/char/vt_ioctl.c')
-rw-r--r-- | drivers/char/vt_ioctl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c index 8971484b956b..1d44f69e1fda 100644 --- a/drivers/char/vt_ioctl.c +++ b/drivers/char/vt_ioctl.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/fs.h> | 25 | #include <linux/fs.h> |
26 | #include <linux/console.h> | 26 | #include <linux/console.h> |
27 | #include <linux/signal.h> | 27 | #include <linux/signal.h> |
28 | #include <linux/timex.h> | ||
28 | 29 | ||
29 | #include <asm/io.h> | 30 | #include <asm/io.h> |
30 | #include <asm/uaccess.h> | 31 | #include <asm/uaccess.h> |
@@ -386,7 +387,7 @@ int vt_ioctl(struct tty_struct *tty, struct file * file, | |||
386 | if (!perm) | 387 | if (!perm) |
387 | return -EPERM; | 388 | return -EPERM; |
388 | if (arg) | 389 | if (arg) |
389 | arg = 1193182 / arg; | 390 | arg = CLOCK_TICK_RATE / arg; |
390 | kd_mksound(arg, 0); | 391 | kd_mksound(arg, 0); |
391 | return 0; | 392 | return 0; |
392 | 393 | ||
@@ -403,7 +404,7 @@ int vt_ioctl(struct tty_struct *tty, struct file * file, | |||
403 | ticks = HZ * ((arg >> 16) & 0xffff) / 1000; | 404 | ticks = HZ * ((arg >> 16) & 0xffff) / 1000; |
404 | count = ticks ? (arg & 0xffff) : 0; | 405 | count = ticks ? (arg & 0xffff) : 0; |
405 | if (count) | 406 | if (count) |
406 | count = 1193182 / count; | 407 | count = CLOCK_TICK_RATE / count; |
407 | kd_mksound(count, ticks); | 408 | kd_mksound(count, ticks); |
408 | return 0; | 409 | return 0; |
409 | } | 410 | } |