From: Thorsten Kranzkowski <dl8bcu@dl8bcu.de>

use CLOCK_TICK_RATE where 1193180 was used in general timing calculations. 
(optional)


---

 25-akpm/drivers/input/joystick/analog.c |    2 +-
 25-akpm/sound/oss/pas2_pcm.c            |    9 +++++----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff -puN drivers/input/joystick/analog.c~use-clock_tick_rate drivers/input/joystick/analog.c
--- 25/drivers/input/joystick/analog.c~use-clock_tick_rate	Tue May  4 14:15:15 2004
+++ 25-akpm/drivers/input/joystick/analog.c	Tue May  4 14:15:15 2004
@@ -142,7 +142,7 @@ struct analog_port {
 
 #ifdef __i386__
 #define GET_TIME(x)	do { if (cpu_has_tsc) rdtscl(x); else x = get_time_pit(); } while (0)
-#define DELTA(x,y)	(cpu_has_tsc?((y)-(x)):((x)-(y)+((x)<(y)?1193182L/HZ:0)))
+#define DELTA(x,y)	(cpu_has_tsc ? ((y) - (x)) : ((x) - (y) + ((x) < (y) ? CLOCK_TICK_RATE / HZ : 0)))
 #define TIME_NAME	(cpu_has_tsc?"TSC":"PIT")
 static unsigned int get_time_pit(void)
 {
diff -puN sound/oss/pas2_pcm.c~use-clock_tick_rate sound/oss/pas2_pcm.c
--- 25/sound/oss/pas2_pcm.c~use-clock_tick_rate	Tue May  4 14:15:15 2004
+++ 25-akpm/sound/oss/pas2_pcm.c	Tue May  4 14:15:15 2004
@@ -17,6 +17,7 @@
 
 #include <linux/init.h>
 #include <linux/spinlock.h>
+#include <asm/timex.h>
 #include "sound_config.h"
 
 #include "pas2.h"
@@ -62,13 +63,13 @@ static int pcm_set_speed(int arg)
 
 	if (pcm_channels & 2)
 	{
-		foo = (596590 + (arg / 2)) / arg;
-		arg = (596590 + (foo / 2)) / foo;
+		foo = ((CLOCK_TICK_RATE / 2) + (arg / 2)) / arg;
+		arg = ((CLOCK_TICK_RATE / 2) + (foo / 2)) / foo;
 	}
 	else
 	{
-		foo = (1193180 + (arg / 2)) / arg;
-		arg = (1193180 + (foo / 2)) / foo;
+		foo = (CLOCK_TICK_RATE + (arg / 2)) / arg;
+		arg = (CLOCK_TICK_RATE + (foo / 2)) / foo;
 	}
 
 	pcm_speed = arg;

_