[linux-dvb] [PATCH] Make v4l-dvb compile under kernels < 2.6.16

Trent Piepho xyzzy at speakeasy.org
Sun Apr 9 21:41:51 CEST 2006


On Sun, 9 Apr 2006, Michael Krufky wrote:
> Trent Piepho wrote:
> > BTW, this patch would have been about half the work if compat.h would just:
> > #define mutex semaphore
> > for pre-mutex kernels.  As long as no one tries to export a variable or
> > function named mutex, and no one does, it's not going to mess anything up.
>
>
> I think that you're correct.  To make these changes in compat.h would be
> much less invasibe and definately would be the preferred method of doing
> things.

While none of the drivers try to export a variable named mutex, the dvb core
does do this.  So it would be a good idea to change the mutex variable to be
named 'lock' or 'whatever_mutex' or something like that.  I suppose if
everything that refers to the variable includes compat.h first, an no one ever
creates something named semaphore, it would work to not rename the variables,
but it's very poor style IMHO.

Is it still a good idea make the change?  It's a PITA to do, and I don't want
to bother if it won't be accepted.



More information about the linux-dvb mailing list