diff options
author | Takashi Iwai <tiwai@suse.de> | 2018-01-15 04:44:35 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-01-15 14:16:54 -0500 |
commit | c469652bb5e8fb715db7d152f46d33b3740c9b87 (patch) | |
tree | 93217db0de08f1ca2cf41dc55fe1debaaa70725e | |
parent | 671ec859e5ee06ab0bf968e639a25576b18865ad (diff) |
ALSA: hda - Use IS_REACHABLE() for dependency on input
The commit ffcd28d88e4f ("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: ffcd28d88e4f ("ALSA: hda - Select INPUT for Realtek HD-audio codec")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org> # and build-tested
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/hda/Kconfig | 1 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/sound/pci/hda/Kconfig b/sound/pci/hda/Kconfig index 7f3b5ed81995..f7a492c382d9 100644 --- a/sound/pci/hda/Kconfig +++ b/sound/pci/hda/Kconfig | |||
@@ -88,7 +88,6 @@ config SND_HDA_PATCH_LOADER | |||
88 | config SND_HDA_CODEC_REALTEK | 88 | config SND_HDA_CODEC_REALTEK |
89 | tristate "Build Realtek HD-audio codec support" | 89 | tristate "Build Realtek HD-audio codec support" |
90 | select SND_HDA_GENERIC | 90 | select SND_HDA_GENERIC |
91 | select INPUT | ||
92 | help | 91 | help |
93 | Say Y or M here to include Realtek HD-audio codec support in | 92 | Say Y or M here to include Realtek HD-audio codec support in |
94 | snd-hda-intel driver, such as ALC880. | 93 | snd-hda-intel driver, such as ALC880. |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 93d2ce891db6..552646c049fa 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -3810,6 +3810,7 @@ static void alc280_fixup_hp_gpio4(struct hda_codec *codec, | |||
3810 | } | 3810 | } |
3811 | } | 3811 | } |
3812 | 3812 | ||
3813 | #if IS_REACHABLE(INPUT) | ||
3813 | static void gpio2_mic_hotkey_event(struct hda_codec *codec, | 3814 | static void gpio2_mic_hotkey_event(struct hda_codec *codec, |
3814 | struct hda_jack_callback *event) | 3815 | struct hda_jack_callback *event) |
3815 | { | 3816 | { |
@@ -3942,6 +3943,10 @@ static void alc233_fixup_lenovo_line2_mic_hotkey(struct hda_codec *codec, | |||
3942 | spec->kb_dev = NULL; | 3943 | spec->kb_dev = NULL; |
3943 | } | 3944 | } |
3944 | } | 3945 | } |
3946 | #else /* INPUT */ | ||
3947 | #define alc280_fixup_hp_gpio2_mic_hotkey NULL | ||
3948 | #define alc233_fixup_lenovo_line2_mic_hotkey NULL | ||
3949 | #endif /* INPUT */ | ||
3945 | 3950 | ||
3946 | static void alc269_fixup_hp_line1_mic1_led(struct hda_codec *codec, | 3951 | static void alc269_fixup_hp_line1_mic1_led(struct hda_codec *codec, |
3947 | const struct hda_fixup *fix, int action) | 3952 | const struct hda_fixup *fix, int action) |