lkml.org 
[lkml]   [2007]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [i2c] [PATCH] I2C: add support for the PCF8575 chip
On Mon, 22 Oct 2007, Andrew Morton wrote:
> On Fri, 5 Oct 2007 11:32:35 +0200
> "Bart Van Assche" <bart.vanassche@gmail.com> wrote:
> > +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
> > +static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
> > +#endif
>
> Please remove all the LINUX_VERSION_CODE tests and target only the current
> mainline tree.

If you want to have a module that can be compiled out of tree and support
multiple kernel versions, there is a script used in the v4l-dvb out of tree
build system that can make it easier.

http://linuxtv.org/hg/v4l-dvb/raw-file/4ae65d0844cf/v4l/scripts/gentree.pl

This script will process #if/#ifdef/#elif/etc. directives and remove them
from the source. It is smart enough to understand LINUX_KERNEL_VERSION
tests, && ||, constants, complex expression, etc. It also knows when the
result of an expression isn't known and will leave it in the code in that
case. We use it to strip the compat code from the source when it's sent to
the kernel.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-10-23 00:35    [W:0.269 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site