[cron,job] v4l-dvb daily build 2.6.22 and up: ERRORS, 2.6.16-2.6.21: ERRORS

Message ID 4B2552A4.5090901@freemail.hu (mailing list archive)
State Superseded, archived
Headers

Commit Message

Németh Márton Dec. 13, 2009, 8:46 p.m. UTC
  Hans Verkuil wrote:
> Detailed results are available here:
> 
> http://www.xs4all.nl/~hverkuil/logs/Sunday.log
>> linux-2.6.24.7-i686: ERRORS
>>
>> /marune/build/v4l-dvb-master/v4l/conex.c:1049: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__devinitconst'
>> /marune/build/v4l-dvb-master/v4l/conex.c:1065: error: 'device_table' undeclared here (not in a function)
>> make[3]: *** [/marune/build/v4l-dvb-master/v4l/conex.o] Error 1
>> make[3]: *** Waiting for unfinished jobs....
>> /marune/build/v4l-dvb-master/v4l/etoms.c:873: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__devinitconst'
>> /marune/build/v4l-dvb-master/v4l/etoms.c:893: error: 'device_table' undeclared here (not in a function)
>> make[3]: *** [/marune/build/v4l-dvb-master/v4l/etoms.o] Error 1
>> make[2]: *** [_module_/marune/build/v4l-dvb-master/v4l] Error 2
>> make[2]: Leaving directory `/marune/build/trees/i686/linux-2.6.24.7'
>> make[1]: *** [default] Error 2
>> make[1]: Leaving directory `/marune/build/v4l-dvb-master/v4l'
>> make: *** [all] Error 2
>> Sun Dec 13 19:13:59 CET 2009

It seems that kernels before 2.6.24 (inclusively) do not have "__devinitconst", so  conex.c
and etoms.c can only build with 2.6.25 and later. Should USB_GSPCA_CONEX and USB_GSPCA_ETOMS
be added to v4l/versions.txt?

---
From: Márton Németh <nm127@freemail.hu>

The conex and etoms drivers only build with kernel version 2.6.25 and later.

Signed-off-by: Márton Németh <nm127@freemail.hu>
---

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  

Comments

Jean-Francois Moine Dec. 14, 2009, 8:37 a.m. UTC | #1
On Sun, 13 Dec 2009 21:46:28 +0100
Németh Márton <nm127@freemail.hu> wrote:

> It seems that kernels before 2.6.24 (inclusively) do not have
> "__devinitconst", so  conex.c and etoms.c can only build with 2.6.25
> and later. Should USB_GSPCA_CONEX and USB_GSPCA_ETOMS be added to
> v4l/versions.txt?

The fix is not the right one. Some other gspca subdrivers use
"__devinitconst" (pac7302, pac7311, sonixb and spca506). The fix is to
define the macro for kernels < 2.6.25:

diff -r 174ad3097f17 linux/drivers/media/video/gspca/gspca.h
--- a/linux/drivers/media/video/gspca/gspca.h   Sun Dec 13 18:11:07
2009 +0100
+++ b/linux/drivers/media/video/gspca/gspca.h   Mon Dec 14 09:28:51
2009 +0100 @@ -11,6 +11,10 @@ /* compilation option */
 #define GSPCA_DEBUG 1
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25)
+#define __devinitconst __section(.devinit.rodata)
+#endif
+
 #ifdef GSPCA_DEBUG
 /* GSPCA our debug messages */
 extern int gspca_debug;

I will ask to upload the changeset (actually in my test repository) as
soon as it is validated (i.e. if it works with hal).
  
Mauro Carvalho Chehab Dec. 14, 2009, 1:29 p.m. UTC | #2
Jean-Francois Moine wrote:
> On Sun, 13 Dec 2009 21:46:28 +0100
> Németh Márton <nm127@freemail.hu> wrote:
> 
>> It seems that kernels before 2.6.24 (inclusively) do not have
>> "__devinitconst", so  conex.c and etoms.c can only build with 2.6.25
>> and later. Should USB_GSPCA_CONEX and USB_GSPCA_ETOMS be added to
>> v4l/versions.txt?
> 
> The fix is not the right one. Some other gspca subdrivers use
> "__devinitconst" (pac7302, pac7311, sonixb and spca506). The fix is to
> define the macro for kernels < 2.6.25:
> 
> diff -r 174ad3097f17 linux/drivers/media/video/gspca/gspca.h
> --- a/linux/drivers/media/video/gspca/gspca.h   Sun Dec 13 18:11:07
> 2009 +0100
> +++ b/linux/drivers/media/video/gspca/gspca.h   Mon Dec 14 09:28:51
> 2009 +0100 @@ -11,6 +11,10 @@ /* compilation option */
>  #define GSPCA_DEBUG 1
>  
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25)
> +#define __devinitconst __section(.devinit.rodata)
> +#endif
> +

Better to add it at v4l/compat.h, to avoid polluting the drivers with
compat code.

Cheers
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  

Patch

diff -r e2f13778b5dc v4l/versions.txt
--- a/v4l/versions.txt	Sat Dec 12 17:25:43 2009 +0100
+++ b/v4l/versions.txt	Sun Dec 13 21:40:58 2009 +0100
@@ -54,6 +54,11 @@ 
 RADIO_SI4713
 I2C_SI4713

+[2.6.25]
+# The drivers uses "__devinitconst"
+USB_GSPCA_CONEX
+USB_GSPCA_ETOMS
+
 [2.6.24]
 # Some freezer routines
 USB_GSPCA_SN9C20X_EVDEV