[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131027163126.GA25517@earth.universe>
Date: Sun, 27 Oct 2013 17:31:27 +0100
From: Sebastian Reichel <sre@...g0.de>
To: Tony Lindgren <tony@...mide.com>
Cc: Pavel Machek <pavel@....cz>, linux-input@...r.kernel.org,
"'Beno?t Cousson'" <bcousson@...libre.com>,
Rob Herring <rob.herring@...xeda.com>,
Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Stephen Warren <swarren@...dotorg.org>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Rob Landley <rob@...dley.net>,
Russell King <linux@....linux.org.uk>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Grant Likely <grant.likely@...aro.org>,
devicetree@...r.kernel.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-omap@...r.kernel.org
Subject: Re: [PATCHv2 1/3] Input: twl4030-keypad - add device tree support
On Sun, Oct 27, 2013 at 05:23:48AM -0700, Tony Lindgren wrote:
> * Pavel Machek <pavel@....cz> [131027 04:48]:
> > > > > +#if IS_ENABLED(CONFIG_OF)
> > > > I'm probably missing something here, but why not #ifdef CONFIG_OF?
> > >
> > > I have been told for other drivers, that IS_ENABLED() is
> > > the prefered way to check for configuration these days.
> >
> > CONFIG_OF can not be module, using IS_ENABLED() on it is just wrong.
>
> Good point. Looks like there's IS_BUILTIN that's for boolean options.
Using IS_ENABLED for boolean options is supposed to be supported
according to the comment above IS_BUILTIN:
/*
* IS_BUILTIN(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y', 0
* otherwise. For boolean options, this is equivalent to
* IS_ENABLED(CONFIG_FOO).
*/
#define IS_BUILTIN(option) config_enabled(option)
-- Sebastian
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists