From: Grant Likely Date: Mon, 14 Apr 2008 23:21:23 -0500 Subject: [U-Boot-Users] [PATCH v2 3/7] add an i2c driver for mx31 In-Reply-To: References: <20080414195049.D198D248B9@gemini.denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Apr 14, 2008 at 5:28 PM, Guennadi Liakhovetski wrote: > On Mon, 14 Apr 2008, Wolfgang Denk wrote: > > > In message <20080414064659.GB17663@game.jcrosoft.org> you wrote: > > > > > > > +#if defined(CONFIG_HARD_I2C) && defined (CONFIG_I2C_MXC) > > > Please stop to define this here, move it the Makefile > > > > Hm... While I agree with the simple standard case of a single > > "#ifdef", I'm not so 100% sure it is a good thing to add such complex > > expressions to the Makefile. > > > > Aren't we just moving the #ifdef hell from one place to another? > > Wouldn't it be logical to assume, that if CONFIG_I2C_MXC is defined, > CONFIG_HARD_I2C is meant too? So, we could just put in i2c.h > > #ifdef CONFIG_I2C_MXC > #define CONFIG_HARD_I2C > #endif > > And then use the simple > > OBJC-$(CONFIG_I2C_MXC) += ... > Yes, this is the way I'd solve the problem. Cheers, g. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.