diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-12-10 07:01:28 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-12-10 07:01:28 -0500 |
commit | f4e3040bf0e94ff86ba2c970a4d7691100dc69d5 (patch) | |
tree | 9caca90ea8074e8753c709309a8cc181503a3cd8 /sound/pci/hda/patch_hdmi.c | |
parent | c83d1b37d45a2ecaea7a6ba4ea010f717bdb2740 (diff) |
ALSA: hda - Optimize audio component check in patch_hdmi.c
The audio component is enabled only when CONFIG_SND_HDA_I915 is set.
Give a dummy macro for allowing the compiler optimize out the relevant
codes when this Kconfig isn't set.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_hdmi.c')
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 85342d261043..44d0d2374bb6 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -152,8 +152,12 @@ struct hdmi_spec { | |||
152 | struct i915_audio_component_audio_ops i915_audio_ops; | 152 | struct i915_audio_component_audio_ops i915_audio_ops; |
153 | }; | 153 | }; |
154 | 154 | ||
155 | #ifdef CONFIG_SND_HDA_I915 | ||
155 | #define codec_has_acomp(codec) \ | 156 | #define codec_has_acomp(codec) \ |
156 | ((codec)->bus->core.audio_component != NULL) | 157 | ((codec)->bus->core.audio_component != NULL) |
158 | #else | ||
159 | #define codec_has_acomp(codec) false | ||
160 | #endif | ||
157 | 161 | ||
158 | struct hdmi_audio_infoframe { | 162 | struct hdmi_audio_infoframe { |
159 | u8 type; /* 0x84 */ | 163 | u8 type; /* 0x84 */ |