[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6373b480-2185-4651-b12d-8498c806ff69@zmail16.collab.prod.int.phx2.redhat.com>
Date: Mon, 02 Apr 2012 05:00:42 -0400 (EDT)
From: David Airlie <airlied@...hat.com>
To: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc: Anton Vorontsov <cbou@...l.ru>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Woodhouse <dwmw2@...radead.org>, dri-devel@...ts.freedesktop.org,
David@...edesktop.org, linux-kernel@...r.kernel.org
Subject: Re: broken nouveau dependency on power supply
>
> Ok, not that trivial...
>
> The problem is more like POWER_SUPPLY should be a bool, not a
> tristate.
>
> If you think about it: you don't want things like nouveau to depend
> on a
> random subsystem like that, people will never get it. In fact,
> POWER_SUPPLY provides empty inline stubs when not enabled, so that's
> really designed to not have depends...
>
> However that -cannot- work if POWER_SUPPLY is modular and the drivers
> who use it are not. The only fixes here that make sense I can think
> of
> that don't also involve Kconfig horrors are:
>
> - Ugly: in power_supply.h, use the extern variant if
>
> defined(CONFIG_POWER_SUPPLY) ||
> (defined(CONFIG_POWER_SUPPLY_MODULE) && defined(MODULE))
>
> IE. use the stub if power supply is a module and what is being built
> is
> built-in. Of course that's not only ugly, it somewhat sucks from a
> user
> perspective as the subsystem now exists but can't be used by some
> drivers...
>
> - Better: Just make the bloody thing a bool :-) The power supply
> framework itself is small enough, just make it a boolean option and
> avoid the problem entirely. The actual power supply sub drivers can
> remain modular of course.
We can just do select POWER_SUPPLY.
Yes it reduces the option range for some stupid corner case but really I don't care, removing features from the kernel that a driver depends on is just leading to insane state combination and QA problems.
Dave.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists