From: Takashi Iwai <tiwai@suse.de>
To: "Randy Dunlap" <rdunlap@infradead.org>
Cc: "moderated for non-subscribers" <alsa-devel@alsa-project.org>,
"LKML" <linux-kernel@vger.kernel.org>,
"Jaroslav Kysela" <perex@perex.cz>
Subject: Re: [PATCH] sound/pci/hda: depends on instead of select for INPUT
Date: Mon, 15 Jan 2018 08:50:17 +0100 [thread overview]
Message-ID: <s5h1siref2e.wl-tiwai@suse.de> (raw)
In-Reply-To: <254bab8e-5629-0dc0-5a4e-9a010abf9ad8@infradead.org>
On Mon, 15 Jan 2018 06:11:56 +0100,
Randy Dunlap wrote:
>
> From: Randy Dunlap <rdunlap@infradead.org>
>
> Drivers should not 'select' a subsystem. Instead they should depend
> on it. If the subsystem is disabled, the user probably did that for
> a purpose and one driver shouldn't be changing that.
>
> This also makes all sound/ drivers consistent w.r.t depending on INPUT
> instead of selecting it.
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Jaroslav Kysela <perex@perex.cz>
> Cc: Takashi Iwai <tiwai@suse.com>
> Cc: alsa-devel@alsa-project.org (moderated for non-subscribers)
> ---
> sound/pci/hda/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- lnx-415-rc8.orig/sound/pci/hda/Kconfig
> +++ lnx-415-rc8/sound/pci/hda/Kconfig
> @@ -87,8 +87,8 @@ config SND_HDA_PATCH_LOADER
>
> config SND_HDA_CODEC_REALTEK
> tristate "Build Realtek HD-audio codec support"
> + depends on INPUT
> select SND_HDA_GENERIC
> - select INPUT
This would break if INPUT=m and SND_HDA_CODEC_REALTEK=y.
Usually, we take a trick like
depends on INPUT=y || INPUT=SND_HDA_CODEC_REALTEK
But, looking at the change that introduced the dependency (commit
33f4acd3b214), the code doesn't necessarily depend on INPUT at all.
The select above was put there just because the random build with
INPUT=m and SND_HDA_CODEC_REALTEK=y would break otherwise.
The right fix in this case would be to replace IS_ENABLE(INPUT) with
IS_REACHABLE(INPUT) instead.
thanks,
Takashi
next prev parent reply other threads:[~2018-01-15 7:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-15 5:11 [PATCH] sound/pci/hda: depends on instead of select for INPUT Randy Dunlap
2018-01-15 7:50 ` Takashi Iwai [this message]
2018-01-15 9:50 ` Takashi Iwai
2018-01-15 18:47 ` Randy Dunlap
2018-01-15 19:17 ` Takashi Iwai
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=s5h1siref2e.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=rdunlap@infradead.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