Re: [PATCH v2] mux: remove the Kconfig question for the subsystem

From: Randy Dunlap
Date: Tue Dec 06 2022 - 17:20:37 EST


Hi,

Sorry to drag up such an old thread, but: (please see below)


On 7/4/17 01:22, Peter Rosin wrote:
> The MULTIPLEXER question in the Kconfig might be confusing and is
> of dubious value. Remove it. This makes consumers responsible for
> selecting MULTIPLEXER, which they already do.
>
> Signed-off-by: Peter Rosin <peda@xxxxxxxxxx>
> ---
> drivers/mux/Kconfig | 19 +++++--------------
> 1 file changed, 5 insertions(+), 14 deletions(-)
>
> On 2017-07-04 08:00, Linus Torvalds wrote:
>> On Jul 3, 2017 22:53, "Peter Rosin" <peda@xxxxxxxxxx <mailto:peda@xxxxxxxxxx>> wrote:
>>> But ok, is something like this what you wanted?
>>
>> I *think* this week just result in an empty menu if there are
>> no drivers selecting it.
>>
>> Shouldn't the 'if' be outside the menu? But I didn't test
>> anything, since I'm not in front of my computer any more..
>
> Right, the previous patch also had the problem that it removed
> the MULTIPLEXER option completely and was therefore total crap.
>
> I have tested this patch more thoroughly and it should be a
> definite improvement. Sorry for the noise...
>
> Cheers,
> peda
>
> diff --git a/drivers/mux/Kconfig b/drivers/mux/Kconfig
> index 7c754a0..19e4e90 100644
> --- a/drivers/mux/Kconfig
> +++ b/drivers/mux/Kconfig
> @@ -2,20 +2,11 @@
> # Multiplexer devices
> #
>
> -menuconfig MULTIPLEXER
> - tristate "Multiplexer subsystem"
> - help
> - Multiplexer controller subsystem. Multiplexers are used in a
> - variety of settings, and this subsystem abstracts their use
> - so that the rest of the kernel sees a common interface. When
> - multiple parallel multiplexers are controlled by one single
> - multiplexer controller, this subsystem also coordinates the
> - multiplexer accesses.
> -
> - To compile the subsystem as a module, choose M here: the module will
> - be called mux-core.
> +config MULTIPLEXER
> + tristate
>
> -if MULTIPLEXER
> +menu "Multiplexer drivers"
> + depends on MULTIPLEXER
>
> config MUX_ADG792A
> tristate "Analog Devices ADG792A/ADG792G Multiplexers"
> @@ -56,4 +47,4 @@ config MUX_MMIO
> To compile the driver as a module, choose M here: the module will
> be called mux-mmio.
>
> -endif
> +endmenu


How does a user enable any of the 4 drivers in drivers/mux/Kconfig unless
some other totally unrelated driver has just happened to select MULTIPLEXER
so that the mux driver menu is visible to them?

I was just about to send a patch (basically a revert but I didn't know it
until I looked up the git blame history/hash for 4c19c0ec73241:
mux: remove the Kconfig question for the subsystem

Thanks.


--
~Randy