[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>

authored by Emmanuel Colbus and committed by Linus Torvalds bcc8ca09 f01b1b0b

+3 -2
+3 -2
drivers/char/vt_ioctl.c
··· 25 #include <linux/fs.h> 26 #include <linux/console.h> 27 #include <linux/signal.h> 28 29 #include <asm/io.h> 30 #include <asm/uaccess.h> ··· 387 if (!perm) 388 return -EPERM; 389 if (arg) 390 - arg = 1193182 / arg; 391 kd_mksound(arg, 0); 392 return 0; 393 ··· 404 ticks = HZ * ((arg >> 16) & 0xffff) / 1000; 405 count = ticks ? (arg & 0xffff) : 0; 406 if (count) 407 - count = 1193182 / count; 408 kd_mksound(count, ticks); 409 return 0; 410 }
··· 25 #include <linux/fs.h> 26 #include <linux/console.h> 27 #include <linux/signal.h> 28 + #include <linux/timex.h> 29 30 #include <asm/io.h> 31 #include <asm/uaccess.h> ··· 386 if (!perm) 387 return -EPERM; 388 if (arg) 389 + arg = CLOCK_TICK_RATE / arg; 390 kd_mksound(arg, 0); 391 return 0; 392 ··· 403 ticks = HZ * ((arg >> 16) & 0xffff) / 1000; 404 count = ticks ? (arg & 0xffff) : 0; 405 if (count) 406 + count = CLOCK_TICK_RATE / count; 407 kd_mksound(count, ticks); 408 return 0; 409 }