Commit c469652b authored by Takashi Iwai's avatar Takashi Iwai

ALSA: hda - Use IS_REACHABLE() for dependency on input

The commit ffcd28d8 ("ALSA: hda - Select INPUT for Realtek
HD-audio codec") introduced the reverse-selection of CONFIG_INPUT for
Realtek codec in order to avoid the mess with dependency between
built-in and modules.  Later on, we obtained IS_REACHABLE() macro
exactly for this kind of problems, and now we can remove th INPUT
selection in Kconfig and put IS_REACHABLE(INPUT) to the appropriate
places in the code, so that the driver doesn't need to select other
subsystem forcibly.

Fixes: ffcd28d8 ("ALSA: hda - Select INPUT for Realtek HD-audio codec")
Reported-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org> # and build-tested
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 671ec859
...@@ -88,7 +88,6 @@ config SND_HDA_PATCH_LOADER ...@@ -88,7 +88,6 @@ config SND_HDA_PATCH_LOADER
config SND_HDA_CODEC_REALTEK config SND_HDA_CODEC_REALTEK
tristate "Build Realtek HD-audio codec support" tristate "Build Realtek HD-audio codec support"
select SND_HDA_GENERIC select SND_HDA_GENERIC
select INPUT
help help
Say Y or M here to include Realtek HD-audio codec support in Say Y or M here to include Realtek HD-audio codec support in
snd-hda-intel driver, such as ALC880. snd-hda-intel driver, such as ALC880.
......
...@@ -3810,6 +3810,7 @@ static void alc280_fixup_hp_gpio4(struct hda_codec *codec, ...@@ -3810,6 +3810,7 @@ static void alc280_fixup_hp_gpio4(struct hda_codec *codec,
} }
} }
#if IS_REACHABLE(INPUT)
static void gpio2_mic_hotkey_event(struct hda_codec *codec, static void gpio2_mic_hotkey_event(struct hda_codec *codec,
struct hda_jack_callback *event) struct hda_jack_callback *event)
{ {
...@@ -3942,6 +3943,10 @@ static void alc233_fixup_lenovo_line2_mic_hotkey(struct hda_codec *codec, ...@@ -3942,6 +3943,10 @@ static void alc233_fixup_lenovo_line2_mic_hotkey(struct hda_codec *codec,
spec->kb_dev = NULL; spec->kb_dev = NULL;
} }
} }
#else /* INPUT */
#define alc280_fixup_hp_gpio2_mic_hotkey NULL
#define alc233_fixup_lenovo_line2_mic_hotkey NULL
#endif /* INPUT */
static void alc269_fixup_hp_line1_mic1_led(struct hda_codec *codec, static void alc269_fixup_hp_line1_mic1_led(struct hda_codec *codec,
const struct hda_fixup *fix, int action) const struct hda_fixup *fix, int action)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment