2.1.88 patch to maui.c

Rutger Nijlunsing (rutger@null.net)
Mon, 9 Mar 1998 18:15:24 +0100 (CET)


Hi,

In 2.1.88 drivers/sound/maui.c (am I the only one with a Turtle Beach
Maui these days ? :) doesn't compile when SMP is disabled. This is
because of a mismatching #ifdef/#ifndef:

#ifdef __SMP__
int i;
#endif
#ifndef __SMP__
for (i = 0; i < 1000000 && !irq_ok; i++);

if (!irq_ok)
return 0;
#endif

I don't know in which case this code should be executed, but the
included patch makes it at least compile and it works for me.

Patch included which also makes the boot code of the maui __initdata,
which increases the 'freeing unused kernel memory' from 28k to 116k.
A 'grep bin2hex drivers/sound/Makefile' suggests the PSS soundcard
also benifits from it (not tested).

By the way, the sounddriver is capable of downloading samples into my
Maui; does anyone have a clue _how_ (MIDI standard, GUS standard, ...)?

--- maui.c.orig Wed Feb 25 22:27:33 1998
+++ maui.c Wed Feb 25 22:28:14 1998
@@ -180,7 +180,7 @@

static int maui_init(int irq)
{
-#ifdef __SMP__
+#ifndef __SMP__
int i;
#endif
unsigned char bits;
--- bin2hex.c.orig Sat Mar 7 21:14:32 1998
+++ bin2hex.c Sat Mar 7 21:38:41 1998
@@ -6,8 +6,9 @@
int i = 0;
int c;

- printf( "/* automatically generated by bin2hex */\n" );
- printf( "static unsigned char %s [] =\n{\n", varname );
+ printf( "/* automatically generated by bin2hex */\n\n"
+ "#include<linux/init.h>\n"
+ "static unsigned char %s [] __initdata =\n{\n", varname );

while ( ( c = getchar( ) ) != EOF )
{

-- 
Rutger Nijlunsing, rutger Ed null.net ---------------------------- Linux! --
Don't BiCapitalize without extremely good reason: it messes up the natural
human-eyeball search order -- Your Friendly Neighborhood Archive Maintainers
+31-40 ----------------------------------------------------------- ^X^S^X^Cs

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu