From: Adrian Bunk <bunk@kernel.org>
To: David Miller <davem@davemloft.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Kconfig 'depend' vs. 'select'
Date: Mon, 28 Apr 2008 11:13:19 +0300 [thread overview]
Message-ID: <20080428081319.GC16379@cs181133002.pp.htv.fi> (raw)
In-Reply-To: <20080427.234221.40346351.davem@davemloft.net>
On Sun, Apr 27, 2008 at 11:42:21PM -0700, David Miller wrote:
> From: Adrian Bunk <bunk@kernel.org>
> Date: Mon, 28 Apr 2008 09:39:54 +0300
>
> > On Sun, Apr 27, 2008 at 05:45:36PM -0700, David Miller wrote:
> > >
> > > I'm trying to stir up interest in solving a problem that seems to pop
> > > up frequently. :)
> > >
> > > The short story is:
> > >
> > > 1) If you say your driver "depend"s on a subsystem providing a set of
> > > interfaces you need, this doesn't work properly if your driver is
> > > marked built-in and that subsystem you need is modular for some
> > > reason.
> > >...
> >
> > This should work.
>
> It doesn't.
>
> > Can you give an example of the problem you are thinking of?
>
> We've hit this specifically with the intel iwlwifi wireless drivers
> over the past week.
If you refer to Luca's patch, that's the select problem, not a problem
with depends.
The only small pitfall with depends I'm aware of is if a bool driver
depends on a tristate subsystem (same problem as what I describe below).
> > What about "select"?
> >
> > That's exactly what it's doing.
>
> Select doesn't enable downstream dependencies, it just blindly turns
> it on, non-modular. That's not what we want at all.
The non-modular is only true for "bool selects tristate".
You are talking about things like:
config IWL4965_LEDS
bool "Enable LEDS features in iwl4965 driver"
select LEDS_CLASS
The problem here is that from a kconfig perspective IWL4965_LEDS could
as well be an own driver you want for some reason non-modular.
The solution is to do the following instead:
config IWL4965
tristate "Intel Wireless WiFi 4965AGN"
select LEDS_CLASS if IWL4965_LEDS
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
next prev parent reply other threads:[~2008-04-28 8:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-28 0:45 David Miller
2008-04-28 4:58 ` Arjan van de Ven
2008-04-28 6:32 ` Seewer Philippe
2008-04-28 6:40 ` David Miller
2008-04-28 6:39 ` Adrian Bunk
2008-04-28 6:42 ` David Miller
2008-04-28 8:13 ` Adrian Bunk [this message]
2008-04-28 8:54 ` David Miller
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=20080428081319.GC16379@cs181133002.pp.htv.fi \
--to=bunk@kernel.org \
--cc=davem@davemloft.net \
--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®