aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/vt_ioctl.c
diff options
context:
space:
mode:
authorEmmanuel Colbus <emmanuel.colbus@rd.francetelecom.com>2005-06-28 20:44:49 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-28 21:20:30 -0700
commitbcc8ca09920755520ba8a1e2d9f72fe8ff892643 (patch)
tree2dcc08ae49183ee34ed9d049331c728559b8b57d /drivers/char/vt_ioctl.c
parentf01b1b0baa454825ed95c28d2a6a71bbf4510836 (diff)
[PATCH] Adapt drivers/char/vt_ioctl.c to non-x86
This code uses the x86 (non-AMD-ELAN) value of CLOCK_TICK_RATE instead of CLOCK_TICK_RATE itself, which is wrong for other archs. Signed-off-by: Emmanuel Colbus <emmanuel.colbus@ensimag.imag.fr> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/vt_ioctl.c')
-rw-r--r--drivers/char/vt_ioctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c
index 8971484b956..1d44f69e1fd 100644
--- a/drivers/char/vt_ioctl.c
+++ b/drivers/char/vt_ioctl.c
@@ -25,6 +25,7 @@
#include <linux/fs.h>
#include <linux/console.h>
#include <linux/signal.h>
+#include <linux/timex.h>
#include <asm/io.h>
#include <asm/uaccess.h>
@@ -386,7 +387,7 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
if (!perm)
return -EPERM;
if (arg)
- arg = 1193182 / arg;
+ arg = CLOCK_TICK_RATE / arg;
kd_mksound(arg, 0);
return 0;
@@ -403,7 +404,7 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
ticks = HZ * ((arg >> 16) & 0xffff) / 1000;
count = ticks ? (arg & 0xffff) : 0;
if (count)
- count = 1193182 / count;
+ count = CLOCK_TICK_RATE / count;
kd_mksound(count, ticks);
return 0;
}