patch-2.2.0-pre7 linux/drivers/sound/wavfront.c

Next file: linux/drivers/video/fbmem.c
Previous file: linux/drivers/sound/lowlevel/README
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.0-pre6/linux/drivers/sound/wavfront.c linux/drivers/sound/wavfront.c
@@ -74,11 +74,29 @@
 #include <linux/config.h>
 #include <linux/init.h>
 
+#include <linux/delay.h>
+
 #include "sound_config.h"
 #include "soundmodule.h"
 
 #include <linux/wavefront.h>
 
+/*
+ *	This sucks, hopefully it'll get standardised
+ */
+ 
+#if defined(__alpha__)
+#ifdef __SMP__
+#define LOOPS_PER_SEC cpu_data[smp_processor_id()].loops_per_sec
+#else
+#define LOOPS_PER_SEC	loops_per_sec
+#endif
+#endif
+
+#if defined(__i386__)
+#define LOOPS_PER_SEC current_cpu_data.loops_per_sec
+#endif
+ 
 #define MIDI_SYNTH_NAME	"WaveFront MIDI"
 #define MIDI_SYNTH_CAPS	SYNTH_CAP_INPUT
 #include "midi_synth.h"
@@ -440,7 +458,7 @@
 
 	if (short_loop_cnt == 0) {
 		short_loop_cnt = wait_usecs *
-			(current_cpu_data.loops_per_sec / 1000000);
+			(LOOPS_PER_SEC / 1000000);
 	}
 
 	/* Spin for a short period of time, because >99% of all

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov