[linux-dvb] [PATCH] Make v4l-dvb compile under kernels < 2.6.16
Mauro Carvalho Chehab
mchehab at infradead.org
Mon Apr 10 02:40:19 CEST 2006
Em Dom, 2006-04-09 às 16:51 -0700, Trent Piepho escreveu:
> On Sun, 9 Apr 2006, Mauro Carvalho Chehab 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.
> > Your patch is OK. The rest of mutex conversion is handled by compat.h.
> > Only struct names are different and should be changed on every file.
> > I'm applying it at master tree and changing version for the newer files
> > to 2.6.14 (This is the oldest kernel I have here right now to test).
> Michael suggested that I try add the define to rename the struct in compat.h,
> as this will remove a lot of compat code from all the drivers. What do you
> say? All that #if stuff can build up to make quite a mess.
Hmmm... #define mutex semaphore seems to be too dangerous, since it
might change some non-struct names and might generate some naming
conflicts. It would be nice if there were some way to change "struct
mutex" into "struct semaphore", but I dunno any ways of doing this with
> I've tested with kernel 2.6.12, all the x86 drivers compiled fine. I think
> there was an I2C change in kernel 2.6.13 that I had to include some compat
> stuff for.
If it worked with 2.6.12, it is very likely to work also with 2.6.13.
Most of those drivers don't use i2c.
More information about the linux-dvb