mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Trent Piepho <xyzzy@speakeasy.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Bart Van Assche <bart.vanassche@gmail.com>,
	linux-kernel@vger.kernel.org, i2c@lm-sensors.org
Subject: Re: [i2c] [PATCH] I2C: add support for the PCF8575 chip
Date: Mon, 22 Oct 2007 15:32:40 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0710221522350.16052@shell4.speakeasy.net> (raw)
In-Reply-To: <20071022145814.84e46287.akpm@linux-foundation.org>

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.

  reply	other threads:[~2007-10-22 22:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-05  9:32 Bart Van Assche
2007-10-05 20:11 ` Jean Delvare
2007-10-22 21:58 ` Andrew Morton
2007-10-22 22:32   ` Trent Piepho [this message]
2007-10-23 11:50   ` Jean Delvare
2007-10-23 16:18     ` Andrew Morton
2007-10-24  8:34       ` Jean Delvare

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.58.0710221522350.16052@shell4.speakeasy.net \
    --to=xyzzy@speakeasy.org \
    --cc=akpm@linux-foundation.org \
    --cc=bart.vanassche@gmail.com \
    --cc=i2c@lm-sensors.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®