diff options
author | Takashi Iwai <tiwai@suse.de> | 2024-05-01 18:10:10 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2024-05-01 18:12:43 +0200 |
commit | 9b3c22ab3929672b117f5c46d718692abb65da0b (patch) | |
tree | f4eca2c8bcbfe745bb99fdc3de44c5cab76737ee | |
parent | a30a7a29c35ef9d90bdec86d3051c32f47d6041f (diff) | |
download | sound-9b3c22ab3929672b117f5c46d718692abb65da0b.tar.gz |
ALSA: hda/realtek: Fix build error without CONFIG_PM
Notice: this object is not reachable from any branch.
The alc_spec.power_hook is defined only with CONFIG_PM, and the recent
fix overlooked it, resulting in a build error without CONFIG_PM.
Fix it with the simple ifdef.
We may drop the whole CONFIG_PM dependency there, but it should be
done in a separate cleanup patch later.
Fixes: 1e707769df07 ("ALSA: hda/realtek - Set GPIO3 to default at S4 state for Thinkpad with ALC1318")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202405012104.Dr7h318W-lkp@intel.com/
Message-ID: <20240501161019.8373-1-tiwai@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Notice: this object is not reachable from any branch.
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index e704425788ebff..723b35842347a2 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -7219,7 +7219,9 @@ static void alc287_fixup_lenovo_thinkpad_with_alc1318(struct hda_codec *codec, if (action != HDA_FIXUP_ACT_PRE_PROBE) return; +#ifdef CONFIG_PM spec->power_hook = alc287_s4_power_gpio3_default; +#endif spec->gen.pcm_playback_hook = alc287_alc1318_playback_pcm_hook; } |