On Mon, 9 Mar 2009, Mauro Carvalho Chehab wrote: > On Mon, 9 Mar 2009 08:45:42 +0100 > Hans Verkuil <hverkuil@xxxxxxxxx> wrote: > > > On Monday 09 March 2009 02:20:19 Trent Piepho wrote: > > > On Sun, 8 Mar 2009, Hans Verkuil wrote: > > > > - zoran/bt819: use new notify functionality. > > > > > > You put compat.h in the wrong spot in this patch. It goes before any > > > header file that are in v4l-dvb, but you've moved it to after > > > v4l2-common. > > > > That's not what README.patches says: > > > > There are several compatibility procedures already defined > > in "compat.h" file. If needed, it is better to include it after all > > other kernel standard headers, and before any specific header > > for that file. Something like: The docs are wrong then. I'm the one who came up with the current system for placing compat.h, I think I know how I designed it. It should come after files that come from the kernel source (i.e., header files that are from the old kernel) and before any headers that are in v4l-dvb hg (i.e., headers that are the same no matter what kernel). This way we can take a type like "struct delayed_work" and use a #define to change that into "struct work_struct" when compiling on a kernel where the structure still had that name. Since all v4l-dvb code, even headers like media/v4l-common.h, will use the current "struct delayed_work", compat.h must come before them for the #define to fix the struct name. We also use this for the common problem of a function gaining or losing an argument. If the macro comes before the funtion is defined in the header from the kernel source then it would mess the function prototype up. > > should be included at the files under v4l-dvb tree. This header also > > includes linux/version.h. I changed the build system long ago to include version.h via a gcc command line option. This way you can stick a kernel version compat ifdef anywhere in the file, for instance not including mutex.h was a common thing at the beginning of files when we had compat for pre-mutex kernels, and not have to worry about putting version.h or compat.h before the ifdef. -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html