lkml.org 
[lkml]   [2003]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.6.0-test1-ac2: multiple definitions of hexium_*
Hello Adrian, Alan,

> I got the following compile error:
>
> <-- snip -->
> LD drivers/media/video/built-in.o
> drivers/media/video/hexium_gemini.o(.data+0x4): multiple definition of
> `hexium_num'
> drivers/media/video/hexium_orion.o(.data+0x4): first defined here
> drivers/media/video/hexium_gemini.o(.init.text+0x0): In function
> `hexium_init_module':
> : multiple definition of `hexium_init_module'
> drivers/media/video/hexium_orion.o(.init.text+0x0): first defined here
> drivers/media/video/hexium_gemini.o(.exit.text+0x0): In function
> `hexium_cleanup_module':
> : multiple definition of `hexium_cleanup_module'
> drivers/media/video/hexium_orion.o(.exit.text+0x0): first defined here
> make[3]: *** [drivers/media/video/built-in.o] Error 1
> make[2]: *** [drivers/media/video] Error 2
> make[1]: *** [drivers/media] Error 2
> make: *** [drivers] Error 2
>
> <-- snip -->

Thanks for reporting!

Some stuff was not delared static, additionaly some dependencies to i2c
and between saa7146 and hexium were missing, the following patch fixes
all this.

> cu
> Adrian

@ Alan: Many thanks for adding the patches to your ac tree! This makes
my life a lot easier!

CU
Michael.
[V4L] - fix static build for hexium_gemini and hexium_orion drivers (Thanks to Adrian Bunk <bunk@fs.tum.de> for reporting this)
[V4L] - set debug verbosity to 0 for hexium_gemini and hexium_orion drivers
[V4L] - make hexium_gemini and hexium_orion drivers depdend on i2c module
[V4L] - make saa7146 module depend on hexium_gemini and hexium_orion drivers
[V4L] - let the saa7146 i2c bus report itself as I2C_ADAP_CLASS_TV_ANALOG
diff -urwb linux-2.6.0-test1.patch/drivers/media/common/Kconfig linux-2.6.0-test1.work/drivers/media/common/Kconfig
--- linux-2.6.0-test1.patch/drivers/media/common/Kconfig 2003-07-17 10:46:51.000000000 +0200
+++ linux-2.6.0-test1.work/drivers/media/common/Kconfig 2003-07-17 10:38:17.000000000 +0200
@@ -1,8 +1,8 @@
config VIDEO_SAA7146
tristate
- default y if DVB_AV7110=y || DVB_BUDGET=y || DVB_BUDGET_AV=y || VIDEO_MXB=y || VIDEO_DPC=y
- default m if DVB_AV7110=m || DVB_BUDGET=m || DVB_BUDGET_AV=m || VIDEO_MXB=m || VIDEO_DPC=m
- depends on VIDEO_DEV && PCI
+ default y if DVB_AV7110=y || DVB_BUDGET=y || DVB_BUDGET_AV=y || VIDEO_MXB=y || VIDEO_DPC=y || VIDEO_HEXIUM_ORION=y || VIDEO_HEXIUM_GEMINI=y
+ default m if DVB_AV7110=m || DVB_BUDGET=m || DVB_BUDGET_AV=m || VIDEO_MXB=m || VIDEO_DPC=m || VIDEO_HEXIUM_ORION=m || VIDEO_HEXIUM_GEMINI=m
+ depends on VIDEO_DEV && PCI && I2C

config VIDEO_VIDEOBUF
tristate
diff -urwb linux-2.6.0-test1.patch/drivers/media/common/saa7146_i2c.c linux-2.6.0-test1.work/drivers/media/common/saa7146_i2c.c
--- linux-2.6.0-test1.patch/drivers/media/common/saa7146_i2c.c 2003-07-17 10:48:14.000000000 +0200
+++ linux-2.6.0-test1.work/drivers/media/common/saa7146_i2c.c 2003-07-16 12:54:26.000000000 +0200
@@ -419,6 +419,7 @@
i2c_adapter->id = I2C_ALGO_SAA7146;
i2c_adapter->timeout = SAA7146_I2C_TIMEOUT;
i2c_adapter->retries = SAA7146_I2C_RETRIES;
+ i2c_adapter->class = I2C_ADAP_CLASS_TV_ANALOG;
}

return 0;
diff -urwb linux-2.6.0-test1.patch/drivers/media/video/Kconfig linux-2.6.0-test1.work/drivers/media/video/Kconfig
--- linux-2.6.0-test1.patch/drivers/media/video/Kconfig 2003-07-17 10:50:21.000000000 +0200
+++ linux-2.6.0-test1.work/drivers/media/video/Kconfig 2003-07-17 10:38:05.000000000 +0200
@@ -259,7 +259,7 @@

config VIDEO_HEXIUM_ORION
tristate "Hexium HV-PCI6 and Orion frame grabber"
- depends on VIDEO_DEV && PCI
+ depends on VIDEO_DEV && PCI && I2C
---help---
This is a video4linux driver for the Hexium HV-PCI6 and
Orion frame grabber cards by Hexium.
@@ -271,7 +271,7 @@

config VIDEO_HEXIUM_GEMINI
tristate "Hexium Gemini frame grabber"
- depends on VIDEO_DEV && PCI
+ depends on VIDEO_DEV && PCI && I2C
---help---
This is a video4linux driver for the Hexium Gemini frame
grabber card by Hexium. Please note that the Gemini Dual
diff -urwb linux-2.6.0-test1.patch/drivers/media/video/hexium_gemini.c linux-2.6.0-test1.work/drivers/media/video/hexium_gemini.c
--- linux-2.6.0-test1.patch/drivers/media/video/hexium_gemini.c 2003-07-17 10:50:21.000000000 +0200
+++ linux-2.6.0-test1.work/drivers/media/video/hexium_gemini.c 2003-07-17 10:31:52.000000000 +0200
@@ -25,12 +25,12 @@

#include <media/saa7146_vv.h>

-static int debug = 255;
+static int debug = 0;
MODULE_PARM(debug, "i");
MODULE_PARM_DESC(debug, "debug verbosity");

/* global variables */
-int hexium_num = 0;
+static int hexium_num = 0;

#include "hexium_gemini.h"

@@ -388,7 +388,7 @@
.irq_func = NULL,
};

-int __init hexium_init_module(void)
+static int __init hexium_init_module(void)
{
if (0 != saa7146_register_extension(&hexium_extension)) {
DEB_S(("failed to register extension.\n"));
@@ -398,7 +398,7 @@
return 0;
}

-void __exit hexium_cleanup_module(void)
+static void __exit hexium_cleanup_module(void)
{
saa7146_unregister_extension(&hexium_extension);
}
diff -urwb linux-2.6.0-test1.patch/drivers/media/video/hexium_orion.c linux-2.6.0-test1.work/drivers/media/video/hexium_orion.c
--- linux-2.6.0-test1.patch/drivers/media/video/hexium_orion.c 2003-07-17 10:50:21.000000000 +0200
+++ linux-2.6.0-test1.work/drivers/media/video/hexium_orion.c 2003-07-17 10:30:54.000000000 +0200
@@ -25,7 +25,7 @@

#include <media/saa7146_vv.h>

-static int debug = 255;
+static int debug = 0;
MODULE_PARM(debug, "i");
MODULE_PARM_DESC(debug, "debug verbosity");
\
 
 \ /
  Last update: 2005-03-22 13:46    [W:0.163 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site