Jean-Francois Moine wrote:
> On Sun, 13 Dec 2009 21:46:28 +0100
> Németh Márton <nm...@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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to