[MPlayer-dev-eng] [PATCH] mga_vid and linux kernel 2.6

Shachar Raindel shacharr at gmail.com
Tue Jun 29 08:44:32 CEST 2004


Well, apperently some distros have removed these macros from their
version of the kernel, as people complain about errors with these
symbols:

> /extra/mplayer-build/drivers/mga_vid.c: In function `mga_vid_release':
> /extra/mplayer-build/drivers/mga_vid.c:1504: error: `MOD_DEC_USE_COUNT' undeclared (first use in this function)
> /extra/mplayer-build/drivers/mga_vid.c:1504: error: (Each undeclared identifier is reported only once
> /extra/mplayer-build/drivers/mga_vid.c:1504: error: for each function it appears in.)
> /extra/mplayer-build/drivers/mga_vid.c: In function `mga_vid_open':
> /extra/mplayer-build/drivers/mga_vid.c:1549: error: `MOD_INC_USE_COUNT' undeclared (first use in this function)

(from http://mplayerhq.hu/pipermail/mplayer-dev-eng/2004-June/026996.html )

Anyway, making these lines to be compiled in only when the kernel is
of version which uses explict, in module usage count method ( earlier
than 2.5.something ) will be more correct anyhow.

    Cheers,
    Shachar


On Tue, 29 Jun 2004 08:36:14 +0200, Gergely Tamas <dice at mfa.kfki.hu> wrote:
> Hi!
> 
>  >   MOD_XXX_USE_COUNT has been removed in the 2.6 series (see
>  > http://lwn.net/Articles/22197/ ). I haven't looked in the patch, but
>  > if it doesn't protect these lines with precompiler #if about the
>  > kernel version.
>  >
>  >    Cheers,
>  >    Shachar
> 
> Thanks, will have a look.
> 
> But as far as I see, it only produces a warning, not an error.
> 
> mga_vid-2.6$ make
> make -C /usr/src/linux-2.6.7-rc2 SUBDIRS=`pwd` modules
> make[1]: Entering directory `/usr/src/linux-2.6.7-rc2'
>   CC [M]  mga_vid-2.6/mga_vid.o
> mga_vid-2.6/mga_vid.c: In function `mga_vid_release':
> mga_vid-2.6/mga_vid.c:1504: warning: `MOD_DEC_USE_COUNT' is deprecated (declared at include/linux/module.h:541)
> mga_vid-2.6/mga_vid.c: In function `mga_vid_open':
> mga_vid-2.6/mga_vid.c:1549: warning: `MOD_INC_USE_COUNT' is deprecated (declared at include/linux/module.h:529)
>   Building modules, stage 2.
>   MODPOST
>   CC      mga_vid-2.6/mga_vid.mod.o
>   LD [M]  mga_vid-2.6/mga_vid.ko
> 
> gcc (GCC) 3.3.3 (Debian 20040422)
> 
> 
> 
> Gergely
> 
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
>




More information about the MPlayer-dev-eng mailing list