Skip to contentSkip to conversation

es1370/1371 compilation clash

DISCUSSION Martin A. Brooks 2 participants 3 messages Jul 10, 2001 Input drivers

lore
Share & tools
lore
#0 lore raw

Hi

I know this isn't really a valid combination however using 2.4.6ac2 and selecting both es1370 and es1371 gives this...

ld -m elf_i386 -r -o sounddrivers.o soundcore.o es1370.o es1371.o ac97_codec.o es1371.o: In function `gameport_register_port':
es1371.o(.text+0x587c): multiple definition of `gameport_register_port' es1370.o(.text+0x5670): first defined here
es1371.o: In function `gameport_unregister_port':
es1371.o(.text+0x5880): multiple definition of `gameport_unregister_port' es1370.o(.text+0x5674): first defined here
make[3]: *** [sounddrivers.o] Error 1

Arguably someone could have both chipsets in the same box, though.

Regards

Martin A. Brooks, Systems Administrator
-------------------------------------------
Hyperlink Plc t: +44 207 395 4980
57-59 Neal Street f: +44 207 395 4981
Covent Garden e: [email protected]
London WC2H 9PJ w: http://www.hyperlink.com

#1 lore raw
Quoted 2 lines · you

I know this isn't really a valid combination however using 2.4.6ac2 and selecting both es1370 and es1371 gives this...

[ output snipped ]

Quoted 1 line

Arguably someone could have both chipsets in the same box, though.

You're right.
This patch should fix that.

regards, alexx

Signature · 4 lines
|    .-.    |   CCNAIA Alexander Griesser <[email protected]>  |   .''`.  |
|    /v\    |  http://www.tuxx-home.at -=- ICQ:63180135  |  : :' :  |
|  /(   )\  |    echo "K..?f{1,2}e[nr]böck" >>~/.score   |  `. `'   |
|   ^^ ^^   |    Linux Version 2.4.6 - Debian Unstable   |    `-    |
drivers/sound/es1371.c renamed from drivers/sound/es1371.c.orig +11 -0
@@ -135,7 +135,18 @@
 #include <asm/dma.h>
 #include <asm/uaccess.h>
 #include <asm/hardirq.h>
+
+/* ESS1370 and ESS1371 conflict, when both are to be comopiled */
+/* This is a small workaround for this problem                 */
+/*   by Alexander Griesser <[email protected]>                       */
+#ifdef CONFIG_SOUND_ES1370
+  #define ESS137X_CONFLICT 1
+#endif
+
 #include <linux/gameport.h>
+
+extern void gameport_register_port(struct gameport *gameport);¶
+extern void gameport_unregister_port(struct gameport *gameport);¶
 
 /* --------------------------------------------------------------------- */
 
include/linux/gameport.h renamed from include/linux/gameport.h.orig +4 -0
@@ -66,6 +66,8 @@
 	struct gameport_dev *next;
 };
 
+#ifndef ESS137X_CONFLICT
+
 int gameport_open(struct gameport *gameport, struct gameport_dev *dev, int mode);
 void gameport_close(struct gameport *gameport);
 void gameport_rescan(struct gameport *gameport);
@@ -137,5 +139,7 @@
 	current->state = TASK_UNINTERRUPTIBLE;
 	schedule_timeout(1 + ms * HZ / 1000);
 }
+
+#endif
 
 #endif
#2 lore raw
In reply to Martin A. Brooks

On Tue, Jul 10, 2001 at 10:23:19PM +0200, you wrote:
I'm sorry, there were 2 illegal characters in this patch (whereever they have come from *stunning*).

This is the "fixed" one ;)
It is also available from:

http://www.tuxx-home.at/kernel-patches/

regards, alexx

Signature · 4 lines
|    .-.    |   CCNAIA Alexander Griesser <[email protected]>  |   .''`.  |
|    /v\    |  http://www.tuxx-home.at -=- ICQ:63180135  |  : :' :  |
|  /(   )\  |    echo "K..?f{1,2}e[nr]böck" >>~/.score   |  `. `'   |
|   ^^ ^^   |    Linux Version 2.4.6 - Debian Unstable   |    `-    |
drivers/sound/es1371.c renamed from drivers/sound/es1371.c.orig +11 -0
@@ -135,7 +135,18 @@
 #include <asm/dma.h>
 #include <asm/uaccess.h>
 #include <asm/hardirq.h>
+
+/* ESS1370 and ESS1371 conflict, when both are to be comopiled */
+/* This is a small workaround for this problem                 */
+/*   by Alexander Griesser <[email protected]>                       */
+#ifdef CONFIG_SOUND_ES1370
+  #define ESS137X_CONFLICT 1
+#endif
+
 #include <linux/gameport.h>
+
+extern void gameport_register_port(struct gameport *gameport);
+extern void gameport_unregister_port(struct gameport *gameport);
 
 /* --------------------------------------------------------------------- */
 
include/linux/gameport.h renamed from include/linux/gameport.h.orig +4 -0
@@ -66,6 +66,8 @@
 	struct gameport_dev *next;
 };
 
+#ifndef ESS137X_CONFLICT
+
 int gameport_open(struct gameport *gameport, struct gameport_dev *dev, int mode);
 void gameport_close(struct gameport *gameport);
 void gameport_rescan(struct gameport *gameport);
@@ -137,5 +139,7 @@
 	current->state = TASK_UNINTERRUPTIBLE;
 	schedule_timeout(1 + ms * HZ / 1000);
 }
+
+#endif
 
 #endif